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:

5525F7
0242ED
6863A8
CD1CBC
F3BAD7
CE4314
C39917
3F708B
D83ED4
938BC9
907FBB
3AEB3D
89E7A7
B9A1CF
CBBBA4
4C2831
F69C0C
9C5D9D
7BEA17
1C7C47
B73844
CB188E
6161DA
14E56B
3F6084
F7044D
CD0CD3
60E8E0
D44444
174644
AB0B3A
2F5192
304CB0
368D18
45C8AC
E84EEF
1AB9A7
D0EAAA
E6ED80
EAF63F
167F07
001D1B
D94209
F08866
4AE71C
9C44B4
38404D
DE4D1F
825E55
CDFCFD
66A77A
8A77D2
A4788A
CDC1DA
BFDB2A
041368
03E0A0
F8D7B2
140F52
944DC3
333FFF
CE0A0E
6D12C6
8C099A
77442C
21B0EE
DEFD0C
63E295
960C2B
85DC07
4EE375
B386BF
E614FE
AB03CF
2C3904
96E063
F57A18