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:

EAB1D8
560E41
9DC163
3B84B1
A7EE9A
1F70F4
DB60AB
7F4AE5
83694F
1EABEE
350253
14E439
77DD88
6E7C5C
1F358E
FCFBC8
2421DD
1834C4
032FE1
136FB0
302640
59C5A6
676427
C2B13E
F1C652
D09BEF
85638B
65EFAB
82AFDF
1E6B65
E5A4EA
A2CFA8
3B4962
4C419C
E1937A
6A7999
B6EE6B
21342F
CAE91A
FD6EC5
F55B90
9DBFAB
7C0EB1
7BA0E7
E5E441
BB0DD7
9660DB
A81E28
421ABF
EE1097
AEBF77
4E0882
03470F
77B759
B4E781
E0CA8B
1138FB
55BA81
FB96B2
187EE9
FA487B
4DCD1D
87A289
7C283C
50BADF
9D7C2E
5C5850