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:

900F9A
7EFA31
797B4D
D9E610
FE562B
DB5486
47B953
10592F
7DD4DB
03CA91
984531
65BD4B
03AD30
548DD4
DFE93F
ECC94D
E5D2DB
946EFC
F86951
227A2B
92767C
3B8932
D5632B
8CB2ED
444A7E
B1B71A
1EDE77
860B88
B4B646
A8E57B
EFE55B
5581A2
ED455E
EF78D0
9673CE
A02CD1
E1584F
E89D05
4BFD8A
411147