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:

A047B2
97A744
FA27AC
6953F2
C3EB39
B7216D
18B9FA
045A1C
6802E7
4D59C0
72B6E3
B29A7A
C894F5
9BD739
2E36A2
1FD89B
C8B2E7
B37E07
E400C1
A7C189
1528E7
4F81C8
0C3C6D
275057
2695CE
574571
B061AE
D51E67
66D81B
863C62
AD46A0
9D8939
B3994F
3825DF
F7993D
BD0A9F
B76100
425036
3130E3
8CB1DA
CB8155
C48349
C7C01A
632BA8
0D36AC
0AB93E
76A9BE
3D8A66
EB85FE
C61540
D104EF
F0F6D0
5D9000
105846
EC94F0
4196E5
0DD2AE
78AB68
6ADAEF
46F9ED
0F8422
A8BEBD
E649F4
C60CE7
2F97D1
5F4FB3
F1ED7C
694C5D
685E44
3B62A4
9353BA
0D7CE0
549C9E
3875BD
A0CC1A
53D31E
7BB21F