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:

5EED0F
0F5F1D
AD377E
9BEF55
ABA012
EAF992
58FD9C
47C7CE
355B1A
7FD4E1
BE129B
0F33AB
A1F2E3
931EEB
8A26C0
57AE18
477D0F
459F53
50AAFF
401374
09B7AF
E34623
731540
EB2714
243531
89C806
D466F9
C7BAC3
540E69
9264BB
5391EE
0CD7B7
7F056E
1BD745
1EB88E
378BB0
2CEC71
D9A507
10C7F2
3A3001
74F1D1
4BE154