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:

374440
712A86
5C3CC0
71C8BF
8F8B24
64F9AD
23ABD2
393857
37EC9A
BB7C70
49B3A0
F66B4F
63D178
981262
5935E5
7E593A
04AE37
53C1BA
E0A9C6
5A90AC
9AA0D6
13DEA2
62BBC5
76951C
B38423
8DA959
5819CC
F7FF01
D3862B
78A5A2
D4BE0B
8DC859
B4A6AC
3ECBB8
919CC2
EAF370
BB9C8B
B2B1C4
AFA06C
416AEA
158407
E74DF4
2D1196
DD3BB8
50A972
5A4759
89B604