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:

36C6A6
B3170D
5B9CFD
8841F2
43775E
4C0DE2
EF5757
1F88DC
A7DE36
38D374
477E1A
51433A
1DC9E5
E3AF83
D2CC95
D99390
512349
E5CFDE
E46A49
732D7B
B505A1
C88868
E72FBD
EFCBD0
99883D
F7BA4B
4A1B81
D9EC89
7F7BAB
961353
6A1392
CD0284
CAB6BE
7ED54A
B438DB
5C7E5F
84E328
1CC4C9
A8FC52
A80C4B
163A62
0C191B
4258B7
83DCDC
3A9266
9C6C85
0CE4B0
E2573A
14F885
109C76
750AB1
3BCBF0
3CFC39
DC9381
C57D16
E33865
96902F