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:

CF3399
7B4653
FC82C0
BE73AB
25C69D
B01107
70AD8E
FFBE0E
56115A
CF070D
6FC557
9EE805
3DBB8A
771945
EF0F16
F99455
81BEB9
3C7A74
22C808
EB27AB
BAA7F5
3BF8F9
2E324B
2D7450
C1E867
594BCB
CB0B74
3AC7C5
76B591
0F31EF
DBFFAD
F9D6CF
FF8F99
875F77
160CC8
03E3F2
1F2261
381405
EFDF8A
C40989
D2B1C2
718F3C
1AC337
D666E7
925920
86B6A6
5E0C22
71C740
248466
06467C
151EA4
E6DF56
619B5A
55F1F5
B3178C
5C378A
9EB55B
F964BA
2F8AF5
28D26B
57D724
0708BE
F7AE73
374A8B
0FFB71
08C945
F076C0
B21502
894146
756B41
CC7C51