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:

660799
A0613D
68B4ED
D475BD
DD7FB4
79EEDF
83EDBA
D28590
4292A6
F0E147
23294E
921987
3C14FA
0D51B7
EDAFFB
11C124
561804
308FD7
C4E688
4A7532
7D068A
F20CC4
4A84C3
DCCD63
C1DC5C
D144E1
A020E8
1940FD
D4ACA2
53F497
94021C
09907B
F9AB91
E8B9C7
2CBECF
009A96
46D320
80A4A8
295772
3F0597
832DCD
7A6BC9
B53671
6EA602
4BAC17
9602F2
2686DC
F51A26
1773CE
40CBD5
E43A29
ED7249
683A55
8D4A74
2F22E1
4AFB8D
ABE297
3C9742
149B02
B985BB
C6D780