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:

D10821
672717
AE230F
583C60
5F8817
92AB10
7DE0BC
FDD208
92EFC6
1C2C49
99734E
5C6883
CD2079
B84BC4
EECC13
427D30
EBEF4E
C7E08F
659A60
FC82D6
4D9E44
3AAFBC
84153A
1C18BC
A7C52A
4BCD3D
5B8D26
A05EB4
42C607
0DB7A0
86E628
70070B
A3AF5F
A5FCE7
9FCF26
EA59AD
55A728
407D14
0F6E51
284FFB
0EA71B
EAB46F
FAB530
FC7D3B
817C5E
2D293C
EF9B70
69E5E6
5F528D
146424
0630E6
337733
336C5B
C5990B
1A4218
8ADED9