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:

762F87
61B512
1D7A9B
3132A3
593A58
D9C341
C72ADD
B93F92
D0B0E9
FA91E6
8E2D07
6D4567
1FCEF8
AA9CD1
63AA73
5582D4
AA8BC4
867774
5B8ECE
54E41F
86CA68
C387D4
05CC1A
AE2716
EA4F73
B00D96
F3A2B2
BF05C9
697532
BE8862
D81B40