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:

27FD66
BFD74C
015427
B01917
F0A632
35B84D
967129
AE5FE8
E74053
84B302
2DFC35
A5E13E
21E290
044741
5FF0D3
A8EDC7
D2E1CE
A45539
57F2B0
297437
6A2979
BA47A0
42BA48
2C75AD
99224D
4016F8
4CBC06
DCED3E
12F521
AD6715
D96609
39A7D9
827003
638F92
13AF37
372311
1294D1
244921
BDE193
677BBF
E225A2
309D88