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:

AFBC8D
B3AC4C
51AF8F
27186E
15F1A9
AD61AC
6054C9
EB2F9D
26E4D6
2601D2
19342D
18E6D3
B8045A
8C56E3
1311BB
E3468D
DF68AB
D59C07
DBDADC
FA15BF
A87403
7BD854
037979
1E617B
4DA8A9
8EED4F
B8784B
2E1B0E
091A44
606042
727720
3C93D7
A04F9C
653501
D95D89
AA0425
97063C
6E7B88
CE0D9B
C5116E
73ED65
A0681F
CB5DC6
18A316
7C9C5B
C24E1F
326F8F
F2BF9E
7B22E9
32E27E
9B3231
576C66
B98528
58951F
AADA9E
A5F239