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:

E984D8
03CDC0
31AE3F
56A5B8
4F96BB
D20031
3F3668
090B6B
330E2C
8CABF8
1EF914
771622
568228
DCD92E
67FF5B
E872F7
4012BC
D16CEA
EF82B1
E01D39
BC7FF8
9CD79C
DAC90E
9249D5
FE33F3
DD8CDE
F02793
3DD613
B2B2B2
F123FE
32208C
450968
D8B2AB
EF58F7
3B1356
177E2E
E361E0
F1CC9A
6C1334
C6CD13
1972D6
9113D4
321694
26D202
2F99BA
4AC00B
88C0F7
673B5F
2D62E3
0589B4
8879D1
60B088
55EB0E
4F19B4
AA4245
D03628
537DF8
8520AB
A379BE
CC8610
27DA8C
09FACE
D5A2CE
71EDD8
92BA9B
2C137B
83FC45
4FDA9B
54C0D6
4CF3C7
1B6C4C
3B7684
BEB984
CF8923
0A2134
F76648
458689
7BC3B4
373BA1
9AFFC0
8AF05C
CDF7F1
F2F2EB
50B094
73D1DF
3C07D6
356CAA
962320
C5823C
B0BE9F
919C27
6A8D5E