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:

4189A6
D65C9A
D7A2AA
A6CA08
0A8E32
368A57
678DA9
077938
8FCB54
1FF94E
41C05B
663F87
293F6D
53EB17
5E80F2
444425
6987F5
B5DDB6
E0FD4A
711602
9E7FC2
335E1C
10533F
6BD5FA
0C67AB
C298CA
318012
56CE93
5691EA
E3FE4B
D48185
D87E4A
D95C3E
8F82FD
509A80
A79167
182457
C53F43
83293B
0E4306
CD00CE
64506E
64ACE1
F2A62C
A9042C
55598B
2B38DC
DB735F
46B237
B17CFB
967ED7
3E39EF
43E30B
C54E42
6AFD56
3E2015
5CD818
6B9D93
117982
F6315A
CB8110
69B356