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:

68D21A
6CE66A
ECD977
80E075
DC42AD
6957D6
C26228
F387AA
B912F7
57941E
EAE9E7
E23BA4
744E1F
6464FE
00BABE
4827BE
A4383E
3D351B
7C5890
FE40DC
BDB863
A31046
91AD2B
D471DC
1FBE3E
EC1EAE
00CF42
A61EDE
9888EA
EA9E4E
CCD5B9
6A0DAA
8C7A1D
D59445
DAAE49
31FF33
087A34
5C143F
499F40
DE66A9
42FD91
BB094E
A08712
357AF8
6DC111
5FC232
CF1EB8
0B030D
6B7939
72F058
811BFB
8BD3A9
F79F8B
414958
3C370D
9EB763
2E814E
3B24D3
DE3A61
D1D36B
A363B6
17F901
868B26
F6D8CC
FB0622
07D466
470FD7
AF2FE7
B368B6
FE72A0
D0F7AF
01C485
6BB1A6
9D46F5
D63718
A11958
636C0C
BA6A08
572A64
F17D02
5AA2F1
D6CC98
5F83B0
523575
FEEDC7
DA6A25