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:

F43B3A
CCEC91
6C9E62
1BF541
259C5C
8E6455
64E333
7A7DFE
1690CB
F1E655
E3D660
C7DC6C
29AF8A
5BF1E2
890C59
BAE9A1
2E5EC0
5E58F6
3B88D9
76F7F7
F092BD
B1648F
435296
437819
4A2A6A
F3061F
EC0C75
22D9E1
7C2C9F
FD8949
AA6859
10F2B1
76FBF1
486A97
CC5147
3285CC
636CE3
263E93
71CEDB
1B60C2
D4EA76
FD44A3
BC30B7
632C31