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:

4E2920
ECE216
EEA981
EFB759
E15B6D
F178ED
D3DE10
08156F
322132
455415
5249AE
EB66EF
008D1C
61653C
166B0A
D1472B
6E151A
24C05C
C53CFA
4F1206
DE053C
8BE6FC
8D41BA
8E920A
2B288F
9FC9BD
E2C118
31CD2A
6CCF27
5043CA
4EF5E8
DE5CDD
7F54DB
AF3AC1
0C9C64
7B8C66
D60A69
92DA5F
1670A3
D01166
5E00FB
22D7FB
4A51E4