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:

86D19C
6C77B0
6478BD
CF1E18
4CC320
6A0ECC
E55F31
5CDBB0
1148A6
18E8F7
58A24B
2F229A
3E1FFA
B57E72
DD0246
153D1A
AA1B24
A23FDE
BBAF2D
35A031
513C2C
4ED8A0
2FF13A
4CC58B
D346A2
910B66
348E30
CDF284
314259
C0E7F0
8F39C0
5335D5
B9A6EC
15C183
684406
F3D6B5
41D5F2
BDB5F9
89ECA5
132E4F
29B5B0
1ABAE2
D203F1
0B1026
932747
B5EA63
5C9C5D
15E601
79BD13
E86267
E2E3BA
4C42F7
AF3A06
0B7E6E
ED83B5
EEDE93
6FFE67
C0E394
9D611C
86A439
A22747
85B7F1
FAEB8D
270C95
D91125
B532ED
FBE553
0F6D4B
116692
EDF475
1A77A3
3F7D3A
517380
95DE83
F5B99A
08D3AC
0214F2
36F034