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:

FD6BA6
5893FE
BB2952
A57067
E0296E
E2BAE0
469BB3
B2D269
2F4B7C
0CFC49
FBFA9A
00D7E6
28C5DA
43E65E
1695DE
D8FE15
6D2FBA
728212
15EF71
CB4D65
F3EC1D
E22CC5
EF9535
35DD25
EB714F
997ABF
882E6A
0C4591
352EB7
DC9463
CDD42B
F1352D
9A0230
8D4F4C
CC3489
F0CE19
CC1BA8
DF439C
3E2F60
114E92
0CFFED
748729
219F3F
524CA9
D1D1C6
C1E443
174B54
2AC4C9
C1B99D
BFC0C9
3A2F50
A159F5
5B9D49
130A2B
6870F3
0D39B7
A694C7
DA1BAA
2D912C
1C7078
596056
95663E
C00F57
35074A
1F88DB
DC2922
3648BD
47B54F
A5245B
E450F7
E1AB51
AFF8E8
DC622F
AF3C4C
2EB381
2F4596
3791AE
3D6FB4
02A43B
0B032E