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:

0AC73A
8A0F82
2C9C0B
48E4D2
244840
69A2CA
8BC30F
61E18F
8B9034
97A358
1FC858
4DFFFE
E2F1D5
038586
79F3B1
E1F0F1
41A38E
767D07
42EB49
B6F670
6C1C54
6B8596
CEA9E8
C3A5C0
3237C8
441529
9228C6
D41984
34E36A
95D34F
4A20C4
69BA67
4D35AF
7CB9B8
6156E5
1A3A7C
245DA8
E87F90
8A69D0
A95A5D
D68A01
74CA46
104BF3
6A4EC0
1F9FAA
27E1DF
4831D1
C9D7E6