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:

0CCA6B
87BC88
F5EF29
4FFB9F
7BD2CA
EB2C73
02BC68
D3D3B5
ACBF26
1C287E
646EB7
4EA29E
A7EC1E
C806E7
EA6354
AF8F54
669512
0EDACF
29E51A
D5C869
648B7C
F955FD
D66EF9
F28525
0C32AD
2C0876
2C638C
6D31F1
10559E
2B7177
B3C43D
DBFBFF
FED71D
FEC107
0C175A
0C8C9C
BA8AA5
CB5C15
0C75D2