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:

A86F50
F7004B
E6BD77
B528CE
2EA85B
6E077C
02357F
78C86A
D38FA4
BA4E7D
EE61D7
5CA628
215E3D
C5C7B6
0F8865
A49202
5D20A2
FC0171
BCE527
8184F5
5BF1E0
AB32F9
8862A4
898AB2
37625D
49D7FA
FE7FCE
F54D04
5C3C5C
A4F7C7
236322
CFF360
00F197
60C122
4AD7B1
58CEEA
DF7DDD
E2D699
953534
563102
26DDDE
6308F9
6456C0
AB7E2C
0893FE
B7A102
CD1144
2A4AA9
D3D863
75F216
ED4B25
F93CFB
0965A5
7E1711
9616AD
6BB4CF
9F1DDF
41BF61
362697
09C112
388A13
FE1B9B
86AEC8
A36061
0301BF
76FEBA
1F56BD
5EE65C
062A76
63EF74
F31C8C
242DE4
7EEBDC
0A044F
A9C0D9
C610A9
B9A835
DCDA04
8F949E
2F0753
EF700E
9701AF
ACE0AB
500CD1
F65422
05BB1E
5C4676
6A9745
48AF7E