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:

150B3C
CBD8D2
4EBDE7
AE71F6
0CBF76
E3A696
7D26D3
393A3E
E93068
9A9D28
104D94
BA4EAE
53B2B5
522376
9F0E35
E7D93C
5AB39F
65B606
683003
CAC338
E7904E
51BD1E
A5B306
69ABEF
4649FA
CA4474
5F7EC3
431EA3
F60987
40BCFE
E8A736
9501C1
34EC20
62F5C2
BAFBA9
F726E2
5A6C9B
E11BFD
7B71A6
A6E7BD
98720D
37E2F4
A76D0F
34F1B7
6C9901
0BA200
F5DC3C
73B5BD
C64984
F69928
529903
CDDCA7
A05B4A
34AB91
635F42
468051
A86B18
0C2B8C
9AA7F3
94B5CD
989166
0ACC4E
BD764C
98474F
3798C7
CE7ECE
3E7ABC
543167
7AE939
3E988A