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:

8C33E5
6F6CDC
F85EFB
09BD14
43D7D5
CAA8C6
17EA5E
6D6E5D
90B19F
71E2FA
1523B9
85D85B
A76175
C9031D
A4AF88
4B56FA
D9A0FC
1791F3
53A7A5
64A4AF
B81E9A
ECF1CD
2FBAA2
8C1E8D
0FFCA4
F36D77
3D4941
0B222E
E385F0
E6BCCE
63468C
294933
61C7D3
AA0E5B
2B6A60
B6B9C1
30771C
CF7225
3E508B
73E7A7
7AEF1E
1D9F9A
C1FD65
5DD010
2A2D12
DA300A
E3742B
854060
6BB0C1
D680E2
1D8608