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:

D19435
1D1FE7
43D1FF
B9D083
CACA43
739DB6
4D76F2
B640D2
B65472
FF5AAA
733F0F
3FA1D6
55FB94
D9001A
F4ECA8
9FD3BC
CF6395
A3ED03
715316
D74D58
DF0F06
41D9C4
12CDCB
7AE3C5
FE6CE0
1F4C9C
9799FB
AFDF57
A8A268
8F9BA1
BAF2E5
DC11DE
AA0A93
4435C4
23A4E8
F03B20
A289E3
E35188