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:

EE357A
3740EB
110B06
33290D
4BC2C7
95340D
716B2F
92D654
1BCAA2
729BDD
11EC96
04872A
42ECEC
270F7C
0B9E1A
104EE6
DD3E51
A4F78B
F11F4F
7A8C1F
4F66EB
6D69A2
0FB4FA
713712
4AC8B8
61E7DF
2725A6
80A8A6
4C269B
904FC3
E347D6
9B109D
A23E36
95F54B
5BF832
798B55
750AC8