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:

B5AB27
BBCCA5
1895DE
F0A442
C938B5
C10789
A41761
C289AE
A653EF
380AC8
358DBC
7202C8
B78138
0411BE
98A9C0
A00082
A036D0
9466B2
E30DD6
C8B44B
542FC7
EA8A3A
BB99DD
0EB3B8
2D034C
8C48B9
4AA166