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:

0D7D53
E0D4EE
0E254D
43EB23
1BCE37
34BB54
67B705
B2B11E
7AD933
86B1F4
77AD28
4B4B57
6895DD
AEF1EF
69478F
E7468E
BD0AB7
C2E320
AC635D
DC07AA
567749
132942
ED0CDF
73AE76
BD1662
F20D90
0A6D6B
9B70E3
3B6F46
B05F29
6933C4
B78B6D
05A13D
C911C8
109530
1FD820
7BC9C9
89B45E
89B297
4D2707
6E6AE4
72E679
569870
05BA8B
7321F9
E7BAD4
F2C309
10BF71
418C4F
D8D689
D9C815
412E89
11F413
417519