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:

85C9F8
90263F
3FF7C6
666E19
9C3588
01A3C9
282963
AE9CF7
8B5141
C422BB
EA9E42
098C67
836916
069272
BAEF7D
FC6746
75F3F4
F4661A
5BC6EA
E4B252
0AC574
4B52FD
AA73B0
B8F2BA
78A0E0
656BCE
56DCFE
EAF882
51889D
975E04
5FD57D
DC2C91
A5E320
E7BB19
CE9ACD
60363A
09817D
173CA4
71D61F
B1C610
D9703C
78884C
44EF76
B793C5
2C09C0
9CD57D