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:

87169C
531D23
AB91CD
D010D6
A17214
7FFAF2
1DF115
56EF7D
E86C45
E988CD
F0ECEF
95B0E1
523281
AB73C2
94BD24
3F796C
19E967
8B499B
25E97D
5C868F
91E747
AC8FE9
4EABF6
205AEA
EA2B7C
141AE0
E6C4CD
D97350
EA1645
73F559
D7B8C2
854D82
48286E
743A5F
2E4403
86F233