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:

1CB23B
8F898D
184197
A9663D
8A31FB
4B6D7C
489C75
EAA1C8
DE29C7
8509A8
B5A206
727C89
F6B2CE
28591C
1FCD9E
839F35
617D23
D0B322
3E9A9D
DE4239
34076E
CBAF68
5DDC5E
BCBF09
80750B
B0DD97
A70C97
7C9B94
9A93FD
BDACE2
43BB41
CDEB15