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:

84D061
43C9C5
2E0830
EF168C
CB4830
849F4B
6364A8
0EDCBE
60AA79
960248
0B81D4
B04E8F
8B6395
1FA19E
052789
CDF571
264EC4
0D4969
0EAAA4
8879F8
F5E1C9
577211
800DA5
CEAE6E
E86570
F534BB
63DDF3
7C2800
298FA9
3107B7
B2C997
4706A9
443F74
DFF677
34651C
D7CE8F
5E563B
D5A110
8281DC
4EC8C7
E34960
D8C78B
99443E
AEEB01
28BA9E
466CAE
203039
7DE802
CFC6B3
9AFCB7
08F9AE
12DCFA
9B910E
972276
7BCC37
E49D9E
D0109A
C4E000
B3B8D8
5EE6EF
7B334D
5CA23C
25C78E
D22772
57B36E