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:

D29C23
D500A7
6CF0EC
2B91B7
46A5F6
8C3DF0
EF7E6A
46382F
88526C
8309AE
81D286
08B445
97911B
A29CB6
791BAA
BC12C6
A84178
0C6D49
3EFE8F
7DE05C
3B94B5
D36B64
643FB1
C21084
B82875
F6CCC6
4C94A2
EEAFFA
929F73
25ED88
DF4448
EB754F
A41EB4
0C029D
11224B
CA306F
7A63E5
9F158F
64414A
6B0F70
528240
F3794F
2F5FA6
507618
ADCABD
369062
F79FE9
4C6B40
03C918
6E96CE
F96249
6862BE
BF2162
33BB33
ED22DD
EBADB0