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:

60FFDD
1A97E6
7BBBB1
31A62C
009CEA
492CA5
B96F1C
2F296B
0AE2B5
440326
AB62B6
DC01F0
492644
7F1C08
9E0A9D
563366
BCECEA
C8D350
044853
1A6062
CE4EF1
3220AC
F9110F
B0B723
9745FB
1B2FF2
CD26CE
E2DC7D
791A16
FEE3A9
9ED0F1
7E1672
5C0DC9
77483A
EED46D
A17C0D