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:

9C7F98
2F53B0
753021
485CE4
EC88BB
DA83D5
519B4E
E76103
07D2D3
9FB4F8
FE1410
A2E3AA
7B2FBF
247F13
14F732
2FC947
F34131
9FC504
6A926D
EE9CA1
5F4A1B
F374E7
2D0B69
956ABF
8380CD
B1D77E
1C1BD4
114208
D8BEBD
41EC62
44ECA6
47F24D
35E377
1DB984
DC81D9
0F229A
A5BF1A
AB2E1C
56E355
6B3624
8D8679
85E11D
99578F
E3363F
7E7745
2FC7A9
593644
269A2F
D0B237
431800
83BDF8
CFB2BD
CFE8B0
5F978C
1A3BCC
95D4D6
A69CAE
8B0CAE
D88AE1
440B4B
B0B600
F5F1A2
9B4B00
78B559