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:

C0E2D5
8A6C31
62A0C5
689585
15D5BE
A8015A
E0731E
B8AA51
7BDB34
C38A4C
6C617B
2B33E9
A49485
C11D5E
30F506
7A4B42
D0D16B
C4DA7D
066CFF
A54D6A
B6EA84
264CDE
FA5705
8069ED
96585F
6D11B7
62832B
92CA12
EAACA3
4326A9
A77C89
3FC605
C43444
5F5E96
10EBC4
9C4FB5
3906E6
90A856
595919
56E684
0DAA7A
68F827
0E752C
79CBA6
76AAAE
A4F242
9A4B85
650EA0
9CCBC2
392DA1
6E5686
D8229B
ECB531
F57573
6B591C
475283
657809
3971AF