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:

E0E73A
BFA1EB
B11E2E
ED01D8
8CB622
84C36C
D82C04
65C91E
78845E
E348A8
8BACAB
4BF474
D47D5A
9549F6
D712A7
300D1D
AD2CC4
1DAC9D
931E64
26F781
6F8EC5
B6B409
CBED7D
54977A
D314C6
36E8FA
74ECBA
08361D
045309
48E7E1
C7A451
5C9710
FE762F
510AB2
6D0DB5
2B74C0
478C30
FB6DCF
88EF68
3957DE
7A8B69
0E0A4E
6215AB
3A8E24
8708F6
F77445
36045E
612865
C26194
A4FD7A
471319
C2065A
C54A21
3B9B19
07D999
41A494
7B4F2E
B488F2
4EF816
6A394A
DBE8E2
5ED67F
7B4C7E
F20E65
3AE170
007248
16BE0D
177406
243EAB