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:

E3F818
DBEC19
471C79
DCDA5D
6776F8
2AB38A
EDBB76
7218E8
4568F4
C941C6
2CE51A
2E539C
373174
B60A75
EF3C84
3F5021
8E8D84
36C217
26B3AE
0F6075
4DB0B1
2C8540
72F94D
FE6FB6
FBCDA5
DEF760
B49D2C
DDE1F5
FA11F1
6E65E4
E84786
E1C904
5E150D
1100BE
541FD8
016FF2
4F3CE3
2EF858
E80A0A
2B6659
011C07
4EFBCC
4F93C6
D12630
EF2245
5C168D
DAAF22
6D0F26
3AA88D
2AA132
CFAE73
9146F0
A8604F
718C99
2C4CD3
2F9F5D
59A933
73353C
BDC07C
264D14
D1D5E3
06BDE4
B27C74
7C775B
628218
8D070B
E57E49
B23265
3C9956
F3D4A0
E0218E
FF11C5
06F079
C176A8
153877