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:

401EA3
A90EC2
3EFD80
253B93
BE28BA
D645EA
D80DEE
B782D9
51C6E6
EC3DEE
F1B37D
4477DC
27F200
8C5C64
5BFECB
E48730
0D83F2
AB3BB0
D6B8BB
725F27
88CF02
02F298
87DFA9
FBF8BF
FF3EB9
EC6055
8E0BC8
040451
E0517A
D62B92
214655
954F32
48B4A4
F7381D
DACDF6
1C1B7B
BCA877
3A8BCC
CD9B76
309F4A
77A52D
385CB0
FA5CD0
6A4948
5D34E3
5E9382
2CD629