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:

26AE7B
40D2FB
64EC6A
589D46
D49A33
9B3C06
C8D93E
283F58
0808D4
710BDC
D29F84
4F6CFF
5C46C6
E7AFC3
1D0B6C
D754E8
1A5372
C6DB56
E92E5C
68F576
951481
BEC7C1
3A0967
B91444
3EE903
7C75A9
988244
FC3D31
E1CE94
323DDD
FC985E
05880E
F9008E
6165B6
FDF357
310353
56B796
7C5841
F8A14D
A2843C
FF0CDD