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:

71DE4B
B2BCCC
C2CD25
7A3FF5
D142DD
C1A2A7
952BA5
A3D639
8F10E3
3E7B54
DB7945
01EE56
A9F9DF
BB5060
D3523C
D48D8B
6BA3F8
915C3D
92FEA8
7D2B66
3C3F24
BA430B
08EDB6
E70A62
AAD51B
193606
4DD1C4
7AD12D
BAEBEF
6FA059
7B38E1
089EE6
B960DF
AAB548
BC409C
DD06FB
7C7E0B
75BCBE
954657
1BD612
25257F
381FCB
34B7F8
82C2AB
F2E018
5A72DA
0150DE
B5B273
393938
A1D4C9
B57ADB
C81B08
854FE7
A18D11
33D947
675A42
7252ED
6B152C
C55026
486ABD