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:

A637D3
C5CD37
8B4EAB
975FF0
142E94
2F2232
F4B122
8B9DE3
E0003E
534D73
7D582D
939C96
798F79
7909C2
5B8AF7
D7B3F6
B1020F
17E6BB
73EF6B
410498
EBCFD0
2D92F6
0C292A
98FE9E
9E2EB8
79F6A9
E57C7A
A8BCE3
C0D5D0
F30012
E97C6E
541A8E
F098B3
0AF21F
6BE2DF
1913C7
1048FF
4F2215
6D2A5A
77EBAF
9A8D83
1D70C7
9F7364
C84F7E
8746E3
5380E4
AC82B0
E356FB
D8A213
A41424
7E7EEB
4306B8
400A91
CD8258
888E5F
258098
9A1518
7DC984
110705
F5C569
9BF348
9ADDEE
4D2AB1
B92B95
1E87D4
3A5FA2
6BD006
860F21
04F288
119A6F
F987F2
B65FBE
943198
E1FFB7
694217
B5CBB9
1DE209
A05C09
9CCC5C
330D36
3770A7
98C8D3
9E9D5D
400CE9
B1FEF2
722664
B7A90E
41B556
585DDC
4C0501
0558DC
0D8BA6
158083
240044
B1A287