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:

D1E8B5
5733A3
DAF143
389D03
4ABA7D
9E3DC3
6FD194
D63708
E14654
BC4FC4
28413C
3A2E2D
2A9428
E6D037
12CFD9
230533
5BC6E8
4D26A6
3F4D76
5C91A2
F31172
119392
71B73B
EC0632
48ABF0
957B10
D0E11E
E12266
2F8B01
79F28B
5434C7
5DEE14
F4C31A
B78DC2
9D5D78
54FEA5
888C40
E39DB5
5B841E
CAB586
89E3C3
ED2731
966F69