Home
Source Tarball | Source Zip

This little page does a few nifty things via PHP:

  • Generates a random quantity, between 1 and 100, of hex color codes.
  • Calculates the best color, either black or white, to use for the text to show up when displayed on top of the color.
  • Populates a little div block with the color as background and the label with the white or black text.
  • Calculates two darker shades of the color to be applied to the various parts of the object.
  • Randomly picks one of two different object templates. One faces left, the other, right.
  • Paints three of the parts of the object shown below
  • Combines each of the four parts as layers into a single little object image to be displayed next to its color block.
  • This is the right-facing template:

F93AA5
E7D53C
B7F7E3
3CE940
B2450A
7756C8
F4F612
6179E7
E1EEF0
03D2AF
2873CA
946A8F
FA1ED1
0206B5
26240C
CF7EE1
E04EE2
C3812F
ABA14A
50F711
8471EB
5F095A
B386BD
C38B0F
1F9A94
0B4F26
F0740E
EAB250
FA03E9
085DC5
B9723F
E91048
BDEAA9
30E5BE
BCF9C7
AD97AF
F01093
FC3EA3
0C19E5
0B3D9E
49572A
FB4CA3
2718C8
42544F
3EC0A6
9C4A5A
DD904A
0A1FCF
BA3B21
186A1A
742251
C115A1
5B0068
298819
1CF241
8BD9D4
5406C9
A943F5
B729AF
5602D4
A1DE9B
2650DF
C7ABA8
1D0FA3
31D46A
4A193D
5306C2
DC5CD1
E94834
955677
8C826E
522353
4C5F69
FF03A4
1CFF3D
24F760
64BC9A
4ABCF0
6014D7
C60DE3
5740F0
BC112D
F24C10
43D2B8
BB4401
3C830C
130895
043E34