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:

61732B
45281B
55688C
AF1866
7C7E33
BD5FCF
507858
9EF154
0013C8
0741CD
624670
E7D216
0839ED
1386E7
CB9575
29659B
B70DED
F159CF
72705C
611BDB
6DC0B2
3382FC
BD7D37
753512
D5F610
2B21CB
F1F2B9
5ED0B7
D27026
D829F6
DBF346
5DA149
D773B9
8AD609
5D51A6
571FA3
999631
F5C262
68B20E
52C98B
845A94
6FAB7E
CC0FFF
ADC827
9879C4
DBB618
BB6112
BEE6F5