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:

213109
41C9D1
6F3F61
7DEDC1
A61069
7C56C9
AEAEEB
1BBE94
7BA0A5
A100D9
06D82F
666AA7
B3EC9D
638F69
366198
99ED71
2E8522
996D6A
B6FE32
AE9357
7DB6D2
43086E
4E48F1
79EB82
88DF28
D28EEE
FD3FC5
10E81C
619FD2
79644E
978424
BC295E
2EC8E3
0D7701
6AD5E8
AF7911
46FF8D
2722C6
DDB5A7
D3ADB1
1D8E3B
F5413B
419D10
0DCD65
2CB3A8
C6D72B
03B663
F33D9F
0320E6
EC1743
A947A1
0903BF
66CE9C
BB2DDE
D67E13
0F61B2
2D8A1E
F32925
5F2A7D
DDD25E
4E9972
EC492C
7421AC
FF37D2
0FC2B9
2C1B90
7159B8
84F772
6E4982
A1A0DC
7587A4
B6814B
1296DF
C50FD8
F46F27
9873F5
E9611D
BE9172
B61F10
BEEFD4
232CAE
A1C8A4
873875
307969
84E71B
7AFFE8
4B1622