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:

421305
BA51E2
06A6F8
0A41EC
DD8783
D7DFE1
F4DC3C
DC6392
12B39C
60F4B0
9AAC6E
1C71EF
121ACD
152CB0
3199C9
F7D937
5E18EC
657517
502E48
41C9EF
123718
B2FF32
9BB785
C2B7D3
4D5321
7920A4
6B8AE6
8246ED
6DBE6D
FCC1F7
593245
4EADE5
C893EC
6C47F1
A4121C
D6C390
D9B1BC
AC6737
E39DFE
BAA757
4E667D
82E5CD