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:

536ABD
6D7544
F827F6
53BCB7
C7DDFD
F203BB
908AC8
84E5B3
CAE1FA
B1CBF5
EC40D4
91E401
62EC4F
5E5C73
C70B22
EF492D
DBC1A4
A8EF16
E31538
D1313C
2DC28D
152AE4
200D01
26C5D9
DC3E77
B28C49
5000F2
699EA8
1E64EF
9D3800
0D3B24
424901
1674D2
E23202
0CEAE9
A29705
107650
54BEBF
D4D30B
73F460
E7B7FB
43DC3A
27D378
BC5B04
3A3AA7