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:

4AF799
C14382
37D8D7
49A71F
C21E79
7A6467
1DAFDE
4A5E68
10A12E
411E34
B55820
89E17D
A868BD
EDAEA7
990A1A
194D73
8B4FD3
7A9CE1
05B665
AAFA2A
8D5614
E23A93
B7CE7E
AD9627
417510
4F0B98
208380
B35D22
8D4C64
408ADA
E33FDD
48FE96
98410B
957766
BAB57B
1B9CB2
0230E8
0BFE3D
8D4C87
FED337
52B347
A73D73
4E60E6
71DFDE
59F2EC
0F0822
9A06B1
D7EF60
E0C79F
F483CC
5A8808
7570BF