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:

708CC4
8EEAEF
36E108
B8F271
51F21F
0ECF2D
F064BF
BBB591
757C81
D2E2FC
22E207
D3526D
41EEE4
16211A
46B984
F19A9E
B24082
C602D3
7CF6B3
CD8A4E
29B136
D7C58E
9685D8
420FAE
E403CD
6BEFD3
E1515A
65A18D
2BFF18
CF2AB0
177B76
391579
BFC8D1
3CA8D4
EAC701
D73AD1
A5EBA6
E56057
F5E7F6
10FEBD
407F61
E3D91D
EB4D30
1790D8
C38EC4
C0F777
7B18FF
7C7D6D
2A298A
1035BB
78D122
15848B
91DB42
EB701F
EB6E44
CC8887
A7706F
32D585
BDAFCF
22AF87
F2F030
9CE75C
4E7B8D
3DE39C
26CD14
FB3E90
E90C7D
46B300
DEA5A5
A1AF70
5EA154
15ECBA
A7C553
6AD080
C54EB0