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:

490FF5
D10B93
A6ABF9
8EA713
FCDD61
F9D3A5
7DA32B
484ECC
B3E14E
5F084F
3CDD63
1F9001
55A68C
3E9D4D
F6C872
9754FB
D289D4
B33AF8
C10BB2
70193A
01132B
2C7F9E
7865B9
0D9E35
2DAC25
0DB8B7
BD1D7E
8DACAB
7078D4
8AF056
23472E
C6FE55
EF77F2
8ECBA8
22374D
6E738D