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:

87CAC2
F12A25
891678
A4A4A7
D80FD9
7BF39F
1E1FD8
095031
809064
35D620
335279
B7FB3A
822711
E6EE3E
05AFEB
DED33A
78934D
78D16E
917DA9
E6B3DC
F26B6D
D45B9A
ECBD42
D3E237
069CBD
D02F0C
21E404
91C702
29EF40
72B148
DD6A1F
96C5EE
56F1B7
7D61AE
A73F14
06F251
222257
A07C82
7FDCB7
5540CB
BAC1A2
A72501
276999
A9102E
98683E
896C4B
18226B
15AF69
454CFC
BBBDE5
73BC55
31E744
E593FC
EB9AE8
0D3DED
EAD052
0B6E96
44D17B
09C444
22CDF7
0DEAF7
1F900A
B26F39