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:

235620
202559
63B2ED
EF4991
70CEC2
D4A782
F20397
08BB42
0E177A
9B8D8B
91B047
41A996
4D6605
E0A173
ED9A5B
3B06D7
CCC36F
C5B44D
35A68F
2A973F
C4CB70
B5563A
8AD05B
5CFC99
453FE8
A5358E
A3F0BC
60F7A1
D5EB0D
D925F6
0745F2
9BDD01
B38B4D
BB28CE
A6FB63
EEFC93
38DB1C
3C9DC9
F89FF3
19EA09
085ADD
337C41
066D36
5E52FF
B0D8DA
B3F516
FEA382
A444C1
DF00E6
6C4F8B
452C3F
0BF20A
E2D353
83D867
BADFF7
26E371
D13369
261437
F44C9E
D3F012
5F40D8
3C2396
5DA405
300C31
A7AA11
88B24D
6AABBE
A9E81D
3C74E7
1379D9
376A7F
E08664
B80684