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:

EC4E86
1E0ACE
11BD4D
F02875
C08B09
1AE551
FDB73C
E0F272
85F971
AFB889
27B11E
6FA014
6B2281
B05A87
0BA58C
CF0A41
A2E5A9
CB8E96
DF96AE
8C6611
3F53A9
ACE941
C32E90
2600E3
5A762F
C5EEE5
14D8E1
7FE5A6
BBADFF
2F3F50
A5F0BD
3BEF60
BAA9C0
94A914
348718
C352AC
92BD6E
31F2C8
48991D
65970A
E86B18
5720D5
5972D4
1EB96E
08C533
E32AAA
B64BD7
37E270
019310
DB3922
F03735
13E878
3C782C
227A87
C50747
476C9D
BF463A
302518
215622
5753C5
C7773A
63199A
3137FE
377B79