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:

4F5086
09C2CC
F31B9E
7586AD
9DD104
780885
B516B1
1CCB71
E65931
1BFA10
BAC1D0
829B0F
1F0C94
0FFFD7
A9D6DE
FBA324
3AB10C
FB5A85
A99957
768982
407649
96A633
1F4212
D9302D
C5EF9E
1FEDA1
C0C7F3
DD42D1
0ECE69
7F99DB
3F8EA8
A02B4F
D6FDAB
A6BE7E
D3CC34
86244A
F5F63E
7DA4C3
EEACA8
6F7CC1
E4E15D
4FF371
182A4E
7594E4
C5F32C
55D85D
9FCAD0
B25383
E656FD
EF290F
96C422
DA97D7
AB5A97
B7181D
B269EB
F59E65