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:

FC71EE
354BC3
518586
72C4F3
9AB409
A524B3
F6FAEF
B70864
A27AC6
F0CB22
530CF0
5F1453
5C0AB5
4A2B2B
A88BC1
8401B4
450FB8
4BEDAB
BA1E56
938304
1EA1CE
2076F6
A71560
83328E
0FFC86
3C47F3
0712BE
DC7178
BC29FB
9C03D3
4BBC45
79167D
198FCF
E18979
FF1A43
9719B3
344A18
32A8F6
B6BB64
086450
1C92D8
62FEE9
541695
8C4BF0
E316AD
CE85DB
1BE7D8
C6ADC4
38D515
5316EB
9AFEF4
3FCBD8
D3D0C8
8942EC
DF56DC
2D5047
23E2D9
D3A0B6
AD57D3
C3A62E
18D155
5C4BFF