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:

1548BF
EEA73A
8355A7
8B6942
24F195
756AF9
041FD6
9CB925
6A5454
1E3419
A7370A
7522B1
A42D77
CBF800
05A132
4D5D1A
DD3F03
DFDA20
08AEBD
242386
68A57B
4D1BB2
500709
FB6AD1
EB2F20
01D3E0
EE31D2
5EF6A3
2BC4D1
262085
C5BA1A
30A1ED
A1EA23
A9B953
ED4742
EF0447
7EC599
4A04F5
4E04AF
D4320A
0A6787
A96286