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:

D82354
8C2219
EB4030
0C76F6
FE076B
ECD3DF
138776
6F9E84
D7F972
5E9A60
D5CF0F
4CFDBC
A967A2
EDCD6C
37A771
FBA3A4
F36C53
8A5BCB
F33A1C
432024
A0F929
80CDFE
35A0DC
787D0E
ECF5F4
6CD536
5AE720
DD1047
854C6A
0B66A2
EE05D3
BB60C1
B167E6
6C5B15
3F6DB1
A567BF
1D1708
0B5277
67A7FD
4FCDF0
707BBC
341099
F59D2B
076994
8C56C4
1F1C82
6100AF
00EA75
A9AA8B
9FADC3
134D1D
3730F4
4975B4
CAB206
B57A55
82CC3B
14AB7D
14FFFC
F01EF8
427DB7
C32787
856B69
A95441
685424
C0BE8C
7A28C5
980B85
1AE820
A78675
E3DBB6
8D7DEA
183E1A
8AAFF6
FA3EC2
8BB194
3E9528
9B93B7
9FADB5
4F78DA
EFAAD9
E522ED
E70CEF
356AAB
8F6C0D
397FAF
AC8DFB
6A66E0
47D028
A9898C
7C6B01
7B3BC2
C9A01E
76352D
880152
E762A7
8D9188
BB1F50