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:

1F8DBA
96310A
59206D
5B38AE
B0440C
6F0E1A
B45912
DE50AB
E6B97B
5008BA
E2F816
DED64E
151F80
E7A290
524125
B916C6
2CC037
03893E
181338
38FEB0
6A8B20
485202
E9177F
626F0A
1A83DE
03C8DC
568698
2ACE1E
4DF857
D55282
26873E
4E5F69
DED924
91010F
8EB677
8CB6B8
F3335A
4F4656
C6B8E7
3052EE
023A19
16A84A
840873
4A9033
85A23D
63691D
A18AA2
531787
1C1453
2DBBE7
3DC556
956267
EBDC68
D00CBB
A7CB12