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:

4325F7
1DD677
888A42
D82888
06AB92
FB5F4F
B0F1CA
61E23D
2E0608
977CD1
5C8A74
C1EB30
D17714
9DAC09
BA654C
A1B4CA
B8933C
B0A061
2BEBB1
E2E14F
0DFAEC
1BE315
5C3070
E53423
D2BAA8
534352
D2DF6F
84BBCE
8E3085
7855BC
A3860F
F3D8CD
03735C
717707
DE37B2
A0CAB7
3BB136
630A4F
889452
B047DC
32A10E
0AA6B4
4A711E
F48ABA
E12AAA
5D6AC3
8980C5
638FF3
0683C5
C7945C
4A0AD2
C64FA0
C00EF5
AEEB2B
554E38
17A756
18F5CB