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:

F65430
EF6D5E
0F0319
7C9C79
EAAAEB
483434
633684
9D036E
70632D
885C77
B5A10C
7B5B41
33CA75
D2E14E
9282D0
F9B4A2
57AA49
DC7963
F4CA89
B09DC0
A87654
E596AE
D79F20
B2F5FB
CBF385
5FB2CB
FECB9D
779CF9
B873F9
9A9810
F340BF
1BF10F
EDF3A9
AFB5E7
97BA88
ACB006
4161C9
80E363
74AB8D
A06D87
1BD5E0
F76C3F
8F93C0
E8CF2E
FDADCC
D991C9
3C58FC
BF4300
CBD9CA
62F34A
D081F7
0B3493
D1A24D
E5FE0E
A2AA7D
869616
F78CCB
7124B8
FCD2E6
918894
740DD9
0BEDDA
BC34BF
42C690
73BBB7
A1355C
4C23DF
DC0CCF
62C8CE
9809B2
A51973
28A0CB
D22102
73617A
869910
9DC421
2EAAD8
540D00
CEA135
C120C6
32CA02
B7D0FD
1E71A8
78F2F6
45BAC9
3CACA5
7B6785
8EC632
28D807
411911
FDFDC0
3963B7
115AD0
99882D
99AE37
525162
AB668E
6FCD4E
8CB614
3658B8