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:

B280CA
62393F
E6AE3E
1A76D6
3A492E
4A8833
0CF0C6
962728
051062
F25589
EEF190
8E5596
53EE7B
B72127
3F4C9B
060CC3
EE68A7
7B9752
E5BE8F
1A7F34
EC552D
9DC6B9
102ABE
C2973B
B2107C
E6C7E3
2C6D69
423D9B
0E34E3
AF509B
2EE599
F0836D
C0DE5F
1AF953
9E0297
828A9A
C34FA7
279BA3
6A5722
9D83A3
AB06CD
EF7170
3E590E
54CD7B
3AA5E8
180F52
E3567E
FAD8AE
50A4C8
9E9ADA
65A9FA
292F06
BEC339
2DAE9C
1181C6
F2FBBD