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:

BDDDEF
1B5EB7
5762E5
6CA282
6D6D5F
F59B54
5545D3
2506F1
6D10EC
4692D8
43641F
01349E
1921C6
6EA09E
C841E0
0A8139
84BC4B
646527
F26757
FED5A9
2490E8
D8E0E2
6E27AA
98D1E7
3CA984
09B98A
6FC2B5
E02B17
AA80CA
2A09C7
54056D
517907
EBF901
383749
FB4E91
6D13AB
DD2A67
8EFFEB
148D23
590521
C2496E
D8C6AE
144EE8
012459
DC59ED
570CE3
E1CA5E
F8EDB4
38E08E
2B04CF
A7E09A
E0D3C4
B84A4B
648494
DB9C97
BD3920
7D5229
EE7E30
812E7A
CD0125
451EDD
A9BC46
42B1B6
64C47B
51FB6B