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:

6C7BEC
9C73B6
698C8A
A8D71F
8308E9
5A0256
38AED9
E54616
B6A650
8843D3
357E47
8D9EC7
ACBC3A
8B94AD
854A39
D7858E
21801F
5B0068
77174D
5AAD79
938097
3F2F23
3082FA
434AF5
C7D2B9
E67E97
C691BE
303C4E
E3D10F
097A57
1D77BE
60453E
678311
8F10BF
E45A55
23D174
77B7BC
C32CC5
59DA1F
D4F361
E10F20
99523B
D98BDC
EB35D1
18AFAD
6217E5
86DCEB
C69093
20841E
9A09E8