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:

A902BC
10DB27
DAF438
DFF177
EBF8D4
FACFA7
2E5571
AB63CF
C3366F
647A49
8B62C1
49C149
6311C2
D7A93D
4FE81F
6B3A96
745E3B
80E058
D1A963
37CD58
1BF4E5
D6CF6D
FB466A
555FA7
3B29E1
7503B6
F7607D
E3E2D0
084FA3
059157
7B5F3E
0FE21F
F9286E
2E6101
33EE85
DCB5ED