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:

B821F3
0E40BA
E2F5E2
306E62
BEBA67
8EE970
FBC212
EEC71B
887677
3D142C
222771
C7F951
277232
1DD06E
4BDB52
7FE953
F73264
7C0499
F86EF1
71E47C
A6325E
CD1189
B2E65B
128387
CA7D9C
782FD5
1E8E7D
BF109A
E57040
7EAFE8
09EAC4
EAF214
CEBCB7
9456E4
EB7D10
465199
6196FD
E4AC45
2CB244
6FAC0B