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:

D76A44
721207
D0F4BB
A2BECA
C9B6CD
8C35D6
1E4BC7
9B3482
BD7C8F
F569AE
903D72
4969C5
8289FB
293B49
E13BAE
7643E1
87AB32
756B6F
B05D9D
E4B7B7
AE11BA
8B9D4C
EC8A2F
834C59
44CB9E
80A7E8
D6E4BE
0619F9
507B1D
7CCF60
141A2F
97C3A6
A5880C
1828E0
065CC6
EB602F
00DEDD
E859DA
0C5CC6
B8CFCA
927D65
CE09F4
B3B152
777D70
6AD1A3
72465E
ED735E
2C0A57
96109A
5554B1
FB03FA
15FE0C
F9CE9F
0881C9
2553C7
EBC366
900B50
5E602A
8B5134
7352F5
B5640F
989A0C
8C8BAB
BA671B
49538F
1D9459
AB776F
1F7369
23EDF4
B32756
57AE4E
BC6805
4CA5C1
188C9B
25BA78
326460
D63C44
D5D738
08407B
42B9E8
E0E226
70D119
DB292B
0479C5
20A090
E01A36
3E5F6D
596632
12A8B2
63254A
FD5454
A2F0D1
9467B8
03FB22
8F2664
D5BA62