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:

720ED6
B0EF7C
1E3E29
631BFC
4E18B0
174C72
1AE653
538804
B647E9
EE41A5
1D9467
BBE48D
F04235
B85DA3
BF4A9E
D9794D
E9F240
4A8F54
69E5A8
D4B760
0D384B
699B3A
6E07E1
6D4F37
2675FD
61DD47
9313CE
CA3FA9
EAA6F6
F4E09E
6846AE
D316E3
CD1FB5
0D07E6
65BDA1
1E40C1