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:

1790FB
0E35DF
1A8EA2
693B1A
6FE63C
07BDC1
31897E
AFEFAE
757CA4
986E79
F67037
13AB00
9EB53C
38998F
C8FB06
89E0C9
38C1CE
1523E4
CB28C8
07DDB0
11A337
BF743E
023EF6
A7A70D
6F961C
062BF1
44E050
CAFD29
1A6B42
10CAA8
E7EA42
4F2950
9AD49E
8E64BD
D86DBB
AA999D
FDADD9
AAB144
4A0C84
5C5B69
E6B350
28028C
4D17BF
4D84D6
4CF692
CDE80D
E28618
E53B13
BBAD50
F44CE6
555A88
7E0267
F0C92D
588E1B
0D583D
774FC3
A87BBB
D93B59
C1DC62
E0494C