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:

7F7510
FDB37B
05458C
8045D8
8729E4
C2FF81
4FF07B
0EC674
41491D
0428A6
5A46B7
42AB77
3E9CC4
C4D83B
E4A054
2D983B
ED954D
765FD1
4FBF64
E6BAE9
1ACFBF
19ACB9
A10F94
D64A19
56894D
2193AF
E3DD74
665340
0FCF06
C2AE28
5BD64E
81B70C
DE9E89
FDC81F
D58F24
BCCC1A
F7CC91
0164C8
6D4235
BDE5E7
05812C
E55944
D7152F
8041C4
9D5CD8
EDD457
9410ED
D0F06A
11FA4B
009000
8C4370
265EF7
852A2A
6C1826
6D03B3
788796
186893