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:

0DEC84
AB3E7B
484B56
778997
FCA67D
3AC2B6
F5EDB3
6BFA81
C3ED92
61D72E
696A93
B1A86B
212180
F45578
6D73CD
DF85D1
E91010
75B844
B1DDDF
4C5478
77D8FF
E95817
9C6B89
7F48D8
CEDE21
66DF45
27A540
D13843
A2F13E
ADFF48
CB877D
7CD58B
A10414
62046E
B0CDB6
1C95EF
3D4B12
0D9437
0E8002
89E165
E66BDE
D9968F
182752
7F727C
3C7D7F
99EE89
ED8C33
4FB613
3E93EF
6A3569
429A01
058FED
1B7DAA
19C428
89FC23
C8925D
F45A98
EAE102
06A359
1A73A2
8BB22B
4553BC
09C7D0
A947D1
D97F85
A5E707
1F9979
463373