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:

AC8B21
85D5B6
BE65F8
CA599E
255064
A608C5
886B08
2E22D7
15345B
9C3DE2
87325C
58BC8F
3CFE39
ABB32E
931EF6
02BB01
CA0BA3
B84ED2
7BACDD
2ACE08
A3986B
8A7F9F
087654
F28AFC
07B8A5
2C6C09
435CE4
1B3668
C84511
6F8D34
1D9FB6
9D9DB3
3D2666
17A63D
7D0A9B
46B2A7
A6728E
A758A6
DC158C
7C11D2
3AFEB8
86384E
ED9295
CBED45
57C8B2
B7294F
DDC40F
03983C
F78572
B00A4D
483B62
193FD8
8E6CF3