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:

62AFED
5C4A9B
F38949
A63103
8DC719
916624
20C8DE
3696CA
3C3B58
0A0C26
ED0DB4
A4B377
C93D4B
5CCD79
F90ECC
7A4D84
115555
32335B
F7486D
DBE113
9938E2
F87AB0
90C638
EB9C84
76D520
98A232
45C347
830D3A
738FB1
B61962
AB5F08
4101E1
E2F962
399E39
065AAA
8E01C5
0B5843
BFF59B
5A004F
4A6472
BB044D
C7CAC2
EF40EC
3D2BA7
D2931C
8F6BAC
315F28
9D7C76
FFF10D
BFC28F
A091AB