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:

076599
3E162B
4F504D
082032
D3B9A4
66F93F
756F8F
865A41
97932A
E55502
925DF6
A473DA
E23DA1
37DA87
08CF8A
47BFE4
71C402
82CE63
160D08
177DD8
90786E
EA7757
519431
AB400B
2B64E6
052A54
2A6E48
ACFDE4
FF83B9
D6CE7B
4A0546
293DF6
2B03D2
325B7F
5B682B
8FA385
F42F5D
2B06FD
E55FC3
C9247E
B7AC01
018A35
DCD33D
B150C7
A6A3D2
B93B7B
86AE23
B4EEFF
28A226
97BC6A
1AB452
A5F04B
7854CD
DDFE49
8964F3
C1D015
EF2B12
039B73
B88FDC
490B45