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:

333733
ADF0D4
43C4A0
729278
AF8FAC
901BAB
BFC035
EADC87
D0C533
B40141
CD2096
56896C
00ED88
244638
B1298C
35A8D8
E4844E
C69A47
C1E7CC
3C5EBF
557283
BC128B
4DA50A
CDDDEF
6F8CE6
F0A08A
14E67D
95EFDD
EE95B2
88F2D0
F89D14
7C7181
E7FB9D
3D4A79
3EA7CC
46A25C
ABB387
13C39C
0DEA35
20DEAD