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:

664149
16E131
65BA0D
8462B0
E62609
A0CCD8
F2BEB2
759BB0
0F5D96
D7353E
E64ED6
41EDBB
4EBEB0
322815
5D552F
7215CD
6BC7AF
FC2D32
61839C
F27E87
8949D4
45707B
71E218
E0E2A1
D6D3A2
8CB59D
EEFB1C
4EF722
1387C8
228BC6
5F438C
7B1653
895D69
5E270F
A1898B
358B70
1E8058
070F32
E515DE
BD1C5C
A66206
57BEB5
C21FFA
FFD222
876539
24C4EA
B99BDC
E7D4AC
07F97D
33F9D6
4263B9
C60C33
D45274
12DC0F
086E93
965D64
7264C4
E4CEE7
802ECB
1A9DBF
6761EC
C8BD14
500954
2D0A0F
902160
8DF269