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:

47334B
B76C3D
FDDF6E
7B958B
22A8CB
FA7D8F
768F47
820719
5FEB98
EE9CA6
F39104
0585E9
0A4878
35789E
DF8938
438A7C
0805E9
404572
7A5650
8085E7
113BA3
8C8080
DF49F2
8AF1FC
9941F7
B020EB
8D2E88
14E021
0FDC9E
7BA022
851C1B
9A5061
B6DAE5
572236
E82BDC
1A0FB8
E54ED5
67E720
95A368
C287B7
69EFAB
1B0BF1
D30A34
939EC7
5CE0FC
1523B3
7A3559
E7D128
2D2245
2A545A
CF67B5
4F1327
8E3883
DE7BD0
FCA91F
40564B
5AE493
1AAE82
2EFB59
C4E497
017B2C
A2F175
00765E
1CD026
18AEC8
6FD7A2
EE813F
DA4B57
86875F
5E42DA
F89754
D5BF53
00598B
A9A655
835EBD
A754CF
173177
5174E3