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:

AF118A
310AB0
110B1E
DDA17C
0161B4
3DD75C
416F36
67053F
62B934
5975BC
AE342D
AD60B2
43D8B6
BF91AF
5EEBAB
7C3EA1
B0AB97
F85154
D6B60B
03F572
50C115
270469
7205D6
2BC81B
BF6309
EB5EA1
45190C
6F91B8
16D6EB
D7E25D
DB2D6E
A23892
8129DD
0B0EFF
3ED89A
9491AF
FEDAF7
FD9B43
5EBBE1
BEFA2F
DB9019
A21A11
C9C21D
0903ED
8D29F5
DA88DA
8F0ADF
E995AD
CC9F2A
21D86F
55F0F4
AE02E8
E66DF8
AD9344
220096
1F75ED
58BDBB
1DA1B9
1702C0
41564F
39E626
340107
42F5CA
206596
33B8E0
4910BD