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:

54C891
EC9E99
E68B79
5DD407
42593D
DE21E6
B66D97
7949E2
203DE5
E28F49
7442E0
B58F04
1558CA
190F8E
2669DA
61F9F4
C0A6AD
D7CCC4
91B048
E3E800
EE9118
32EA9D
24FE02
C7C2C4
F3DC7D
F1E4E3
6B9B5B
059B93
81C3FB
2E5A74
96034C
9047D2
250F9A
78ED3C
0C4910
174E17
D8B822
F9F960
1EF677
5099BC
9EF9B9
6E4657
461729
1D6F7B
EBE4DC
C39D63
EB7CAF
0DFE4B
024AD0
06ECC2
4E0CFE
603E90