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:

33D784
A7FB22
EC0E3B
DD3A18
6030D9
E06AFC
D5244B
84E408
249C62
6F0E3D
F097BC
059F41
794C00
C738A9
0C2C6B
EC32C8
B6F30E
563322
94710E
F2B5E2
4C4F33
6C1449
C0FE69
9114BD
1771F6
0C0B3B
96D7E0
ADA1A9
0ADEE2
E30F01
BA6CE2
D0C33F
99DC57
C3F70E
C36A75
E86BA8
C72FC7
587250
17CFFB
3978FB
FE47E1
982EA8
73F099
190944
576F40
8A8CD6
C78E4F
F23376
771750