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:

BA4FE5
C6EBA3
F7A18B
590E75
4A7CCA
6C971E
3B3E2B
38DFD5
324C49
D0F314
410283
F643D6
ED47F0
9E6CAB
358797
4106B8
028352
DADABB
D7D3D7
42282D
3E27F6
6F4B85
DB9AD7
608D34
E6E24D
741A7A
5DF762
2A0C77
FBF2B5
848B00
14022D
F04B44
3CDB6F
814A85
E57E71
C4B9F4
50097B
89358C
9495E9
17D902
DECF9E
406828
11FBE3
0BEC16
3886E4
B4B3AE
8678B3
7F638A
ADE8E4
8F3921
F41CE7
2AAE6D
D11FD0
2DB393
3FD406
E0B75D
5DBF74