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:

876529
EFC944
8BDA54
81E654
9FFFAE
B5D014
17BC26
B6D814
241A2A
D1DE97
E8D349
F2B8C2
036BE8
50D267
F3E57E
D52983
6CAF72
4D220D
8E0A46
A14EBD
745C62
1D97AE
307E4B
29BAAE
A67AC7
B68BCA
9955C2
48D5BD
D8BCAE
2E3814
EDAAE5
E7F75B
ACAC6C
0BDAA1
A2FA9C
ACD594
FE8865
DBE8E3
B1E914
C96A0C
6F97C5
AB01D2
5297B3
3E1EE6
163872
8CE5F8
B0E041
2EB395
847E78
69BE87
7843D1
F7CDE2
35D62D
7566AD
8F1F6E
EDC706
BB1026
9FCBA3
16AA19
FFFC2E
5C94B8
85746C
07A417
F425E6
52EC97
7BADEA
4CAE46
1281C6
CE7E50
0606D8
BD06AA
0ADB3A
471275
486E09
234945
4E9CC8
6F156D
FB0B01
369EE4
F7EA0F
48D9E1
09AF29
107ABB
603CEF
C121D4
F7337D
5214F3
21EB5D
23881D