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:

71A065
AD57CD
3074B6
2ED366
414EE9
98B7B1
BE2B3F
EA5001
4B3391
5C7AE9
57DF3F
537F3D
20E24E
70210B
E499F7
860E8B
A1C1E7
61C731
7626C5
D00AE9
9A728A
6C467E
339C73
817C03
EA6B22
11EC5C
87A2E7
B91AD4
D98918
89EC7D
08A788
A78C6A
599FB3
BCCAC8
6DBD0C
60F92A
2DAEA1
6352CB
6847A7
EFC196
A7B72D
115EAB
0DF271
5E4446
AA5AEF
88CE41
BAD609
3F2AD0
642402
06CF1F
07A3FA
943FBD
87DE66
82C9CF
815E9B
1E9B20
2F5AB5
24DAC4
D1307D
54D34F
01687B
5E820F
796813
7A2D54
CD242A
50BF19
15D10E
34F080
47D3DB
508D17
3A0FDE
5B85F9
CE247C
ACE999
0EC8C0
7073BB
34CDF3
72200C
65EEA2
E3F410