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:

2717F3
3BCE83
F61A65
D1C0EB
445A24
ED8EF5
57053F
354AF8
1F26E4
89BF53
52B29E
E53C70
C841F1
DDB5C5
92E34C
E36193
8E871A
222F09
8316DC
CBA62C
44A15A
BEA35A
1581B1
61A135
175D7C
1D519A
233574
DAA74C
C3831B
72F9DB
82FB72
DC5415
2E7ABF
A04707
BC4564
33D1AC
A23F87
8D1EC0
6BB0BE
0C0139
6E648D
C83C07
E8E70F
E634D6
B0ADBA
54470F
F05044
246959
1DC8AA
4A92B6
90D21F
67D4AB
654AAF
B6380F