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:

8E0FE2
FDAC22
056394
F14DFC
1E2E38
25768B
2CE672
8EDA57
4E6E1A
46F566
DE8335
D7D1E1
D1BFEE
78F055
8AB672
310B89
3B9295
CA7725
4F605F
2528B4
291A08
2EC273
839EB2
5D34A3
0CF227
715A14
52FD26
5BD119
FF6E3F
0AFDB9
967DE0
0EFA98
0744AA
E77E4E
A310C6
627ABF
143D6C
C3EBFB
CD4A00
8548D1
36064A
3D9DAC
421F42
F781C6
0253DA
E084B0
41E6F2
853D56
4E1810
C7C65B
9B0BB7
A91244
D60BAE
D774D6
05992F
107B74
4B10F5
A61D76
8BA5E7
4D2BB9