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:

527701
A7018C
94E4E4
2B20EE
1BD8EA
4A7035
DFA727
CC7134
3C9AA8
8996AC
0DA342
EA7AEF
385D42
96AB8D
180AA5
5C2B79
F9ECC9
9544B5
774283
1D6568
B899F7
DA5AB1
DD04D9
F90B4C
7CCF79
A119B3
8E4783
5DB26C
8B642E
7D41EA
9C81DF
D067F4
ADACAA
25EC17
4E58E0
1474D3
F3E2B7
6A1DC9
AB71BB
6C5CF7
673DFF
CFE0F4
FC595A
8C3598
AE6169
90F1D1
3EF8E6
2527D9
231518
254254
D65AE5
67EF2D
3694BD
13545D
CBB607
B59509
B1CD0A
A2E758
CAA147
CF6A41
25B4A8
CB00A6
D071A2
654ACF
4B90D7
D9EE94
1CFAE9
BD6937
2B7C20
67F923
CD85C1
D7C531
A10BF4
ED4F28
7EC04C
36DD47
E992E5
71CB8C
9EC696