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:

B464BC
1CAD45
D0AEC4
9BCB54
FDC6C9
EB3E9B
A595F1
272A12
9A11AF
B4C500
76CC3F
CD099D
CA9A6C
11E03A
021578
2C709A
270D88
4504A7
BCD571
F14BCE
54CCA8
5225D6
42647E
BC6D90
DE8131
8E3032
8C3529
1E10B1
8302C7
2FD027
D73731
D0AF5D
CD6041
CABB56
80279C