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:

899437
C04099
AD033F
6635FA
9A754F
C9AD3B
C3A4F9
6E31E5
559BAF
CAE56A
FE4E6E
DC6A02
BEFB68
DF7F8A
C0EDEC
030738
C85378
339466
E9202F
25D81B
B02381
DB700B
BBCBF1
A801A8
8EEEE2
1557D9
8AE1E8
646833
FA1C59
B8D5F7
99DB46
E208CF
A7035D
93F874
294278
44A945
06F7C4
0EC841
9656F3
B361D8
F1D7F2
9B76D2
D065B1
41621C
B45C22
9C4A84
2FCBD7
009FAF
C464C3
053890
A44C3B
3A5F42
74E17B
A6440E
53FE2D
B7F08F
464912
BCB698
52B427
206608
B7F9DD
9A1146
329AC2
711FD3
1532D5
66A56C
0A16AF
076961
02BF82
16F901