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:

720B48
62ADBE
049679
2F3DFE
79999D
50FB2A
FCFA63
DA1DA7
A3986F
FF1EC2
2D8F93
C6ADCD
B566E6
C24C6A
556BA1
F01EB5
38B680
A6AD20
9B6AC7
89062F
EDDF2E
6C6F3A
D9084A
38474D
F30DC4
700F5D
BA0179
06CB43
4C806A
27B5A4
07F40B
D8EED8
3AFB5B
539406
3CD407
13A939
DE68E4
328FBD
018344
873D63
960F59
4BC539
A4C3E7
2D0D0D