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:

1E0AB5
0C9DBE
C5D904
5B8B48
015687
B616A0
904F5B
051F29
D06459
BEA9F4
B447EA
710D21
31B0A1
195F36
C9A7CE
EBF144
50A067
1D641E
FF3AC7
105D59
E8FDA9
56861E
B4460E
4541F3
181229
05916F
0BF51A
B20270
9521D6
E9A9F8
F2D38A
6C3F8A
C74B05
A24752
59DC3A
F55D85
F05775
B6653B
6A1D8B
F4E779
53A3E3
5153B5
DED6F9
331B4B
B0EF3B
C88441