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:

A5898D
5972A1
AD879F
A8F4A9
B0EDF6
E8EF26
71E64C
1A9F0D
04BC9C
2EB48F
AE8F68
02BE65
BCE714
22FF25
77C0D6
BBF2ED
4CE356
F1C997
1BAEC0
7E075F
E82C92
67BDC7
1DFBC0
264D2C
937A92
14E318
350AE1
D641A6
3C41BD
BCF4B7
601A7A
EDE68A
940565
27F108
E668A1
2B505E
0E4B19
B90F75
A0787B
92AEAA
DDBBEA
30CE60
4F6C33
F791C3
066931
1EFFE4
03C007
B3D1A6
2B1BE2
A5B797
6C14AB
FD57B9
DB4D2B