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:

A371C6
E9E021
D57924
87403E
9A5C71
56B1E0
C68653
530D5A
FCE204
2F4CA4
723B79
0A2315
B6045C
9FD341
53E2FC
060171
FBC596
AA209E
3CF9EA
AC870C
589B52
3C9241
C21C20
F3D714
B3249D
1E576B
1CA646
E780F1
1DEB2F
26DBEB
1A6C02
A78310
F98941
D1519B
D1F5B5
C357A9
1998B1
1738E7
12E99C
A46999
38572B
31EA1D
19A94A
664DDF
CCE52A
1A5BEB
58713A
FDA93E
072561
5CF1EC
A4731A
B33FBD
6C3D11
59DC9E
1AB041