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:

75E8E0
EBE5BD
6E5EC9
20ABD5
5AFDA2
330D41
815F8B
607E14
277AA7
6622EC
AE8BF2
09D08B
0A9CB8
E67F0A
A56750
03D924
7C6070
90136C
28CBCD
4E0E8C
4D9423
4887C6
A4DA35
2790D0
B0DC47
1FBEC7
72897A
5F9F6C
562E9F
31C371
888FCC
D36335
027578
323943
FE6808
01CCBE
7E9FC5
7C3F5C
5FEEEE
854396
EF84C7
F0127D
C8EBA0
7794B0
B9836E
5964A3
1A0C7E
1F15D5
EA7B2E
2B9610
C2F095
7F2A6C