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:

8DA9D7
28F075
7AEAA3
8E7166
31E422
6F0E41
9DCD2A
DF2C95
46DE26
FB7B5D
26B7FF
2670ED
02D4C5
6EB934
1AE987
FA41FB
7C55DE
64BB9F
478500
3A1096
BB08DC
48E259
A9F8E5
385216
42D967
C0D0D0