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:

659EE3
800657
ECC9E4
61D9D0
2AC784
03ACF4
D86A6C
C2E90C
8857D9
9BA871
58E95F
95C5B4
8D5D75
7F3EF4
8BED0E
9EAFA1
658D6E
5DF9FB
202B0A
006976
F33950
8EBE37
2E1226
A58CBC
2FEF3F
6FC06F
B1367D
611BD4
593173
721826
9F3564
B931D6
2B3CDB
BCD736
4E4E4E
D0496D
10EBE8
E6AFB2
6B2A95
2F2841
4764BB
64335D
7275DF
D10B8A
FC73DC
8617C2
DBAC8A