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:

8DA747
7B1F3C
A1C1FE
F9A06A
A65C58
8DFD95
46D338
C7C671
2363AB
17C2B0
13FC48
DBCACD
7AE276
E51F07
F41078
12B4A9
6FA509
BC8FDB
6DEEBD
33FE84
7A911D
54A908
34308A
9B250B
463590
BB5C6C
AC60F4
7004A8