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:

7505BB
E96A41
3FA4CE
89A223
030170
6EBE2B
12F1F9
223572
7E9349
E001B6
22188A
84E879
A03201
0B2325
F2D868
AB3487
5AFA69
F456A3
13B884
0EC86E
111253
9BEF13
B0062C
15E36D
1E6FDF
2196AA
6F6434
C8BCB6
67A3FA
4FE900
2298F6
14FC0E
BDD806
4ED45D
6A2F6B
619E47
9734EF
85BCDC
71EA9C
0B0C0D
7B2BF7
17DEB2
330762
ACB95A
E0735A
047D44
0EE8C4
CA63C9
030FB0
03BFEB
85424D
B757A7
C9B7E9
424E4F
C168CB
70A704
9D6558
DFF4C1
F46F9C
0359BC
3658C9
3A0781
B0D572
479D71
1B1379
246C77
552544