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:

6C1F79
49E887
1DC881
4323CB
69E6AC
5A95CF
64B65E
0165B2
5C35F0
C92FB5
966849
2F8043
B8CDF7
E8757D
643AD3
810469
FAA41D
0DB1CE
4C95C5
C97B97
445301
D0E39D
A42419
F63565
239759
506E90
E50FCE
2B493B
9D46D2
51938B
BDD011
34508A
6EC3A3
A2BDE9
5DF1AB
D83620
50F367
40BB73
B1394E
AE020A
FF35EE
932FC3
E2DF86
5CAD96
722B87
6A10CB
0A9949
975955
483217
7D0E05
3DF804
368E7A
3E8921
FD8A6F
AB1613
BDEE66
718DEA
06B41B
2C6454
0B292A
1EDE56
5A4C42
E51F63
4454C8
39EC95
C32403
4479E0
F43EE3
EB9464
015110
1FF6A3
3B31FB
576F81
EB6911
6C94EA
337EA0
38412B
BB4014
1F51F4
540996
71CE27
131AB3