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:

768A6A
E8694D
43786C
04BAAC
5C3F99
EE8BFB
54C290
D6F9B4
8CDF71
718135
7200A6
E75524
3C79BD
133C0F
3EDF7C
03CC56
449E75
C6F7DC
9FEF20
D1804A
D49F54
73ABC2
DD2B88
2C9515
9E817F
A8D164
263198
F8FC18
244C6D
FED0EE
90036F
5C6BA3
0D6E8A
6C9CCD
0AED5C
97A44C
CE6435
2E5328
78341B
327AE0
C403E3
94E17A
743445