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:

EA04A7
837CF5
F06179
4300EB
BD68F5
1A002F
9381CE
E4286B
E99E3F
E64E3C
08DA4B
B1E1D6
46BAF2
C85404
1B3F83
EA3688
F40972
B90976
5000F0
F1B9C8
707913
5D3365
E386B2
5B6BDD
5F1579
D665EB
A7A7D6
FA1351
75F977
94D25E
C63C6D
13B232
DB7FC0
EE7E4D
4E07B9
A56851
50216F
447711
C98ABF
C77C9C
F24904
588177
65B21C
F86C89
171143
395212
FD6FD5
9549F4
13C140
9A4EA8
43F5A8
6F3F78
D30B5C
252F8D
E52A44
68DDD6
9829C8
6834F5
45CEF4
135108
E22EF1
755B76
EB90B6
B3D4CE
BA3D71
240E61
0E8938
780DCE
ECC7C4
1E6CC8
CB71A4
88E21A
28AFB8
78DF1E
5470CE