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:

E4DBF7
F8209F
9A5986
5161DB
C85BE0
4D68DB
D14978
C3FD67
7E9B5E
AC88FF
28CD9F
9680BD
D0FF37
EFAEE6
0B0803
18C6ED
A1D78D
A658B8
13F2B0
BA30CC
7E90EE
97139D
17F50F
00006E
42A5EC
CED9E8
02B591
FD9863
71881B
84849B
E1B76F
A59DB3
73291A
D3CA8E
F44155
28D277
A34A61
6E97C3
959A84
B0A85E
0319AD
B0D415
F8046C
73747B
093035
DDB2F6
551791
4D6471
685BDB
8FA29C
D73D4C
A10C6A
5322B7
4F7BE5
29A6C0
A1F66C
4DE9C7
DB744B
95E2E9
CD3FAA
62D326
774C03
F4197A
9D9C39
8F488B
42DFF0
B02B76
296356
142302
870061