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:

5D327F
72CD4F
EE9647
61083D
29914A
E4F03E
71AC56
3C3434
16D79B
A9E893
675EE3
2B5A9E
AC427D
D39DB2
79E68B
D41108
76F5E9
F3171E
56AC11
11A5B7
3D2CD8
438627
CF1C26
C0D7AD
4A46D8
CC43C1
AB703A
EE5494
D68706
548302
938E7D
D9895B