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:

6E86CA
A65197
F76119
5F2B84
B350CC
19E179
3A6981
750434
2BE89C
952441
BBDBB7
5059F2
1C50AE
68E866
CA3067
A108D3
07B882
5FB35F
A0D98D
C5AF9E
93AEB4
4D0F07
0DB1CE
EC3237
A9AB61
3A659E
3C325C
1E98BB
85A3C7
A39C53
9BAF63
D118A2
6B6A5E
1773F4
EBBDA2
A2C28E
8C9B47
A9ED1C
BF1FE3
17563B
21644C
D8A330
BD0E62
14130F
5E4243
D09580
BD0A09
D3FD68
EF3451
E6D0CA
B466FC
C933FC
17CC78
566FB5
09DE44
3629C0
1DB8B2
25D732
07523C
507CB1
C3A230
3BEC9E
2969EC
D58141
610BD5
BD6A12
A0AC34
875862
E2FDA9
5D809D
31CE7F
6C8AE8