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:

0FC74E
0096D2
ADBAE2
0C7EF1
1E3C5D
33AFA3
1DADF5
435CAE
8DE852
00189B
DDC132
64CCBA
1D0A93
A11D52
18D5F8
0B7853
93E23C
E191D5
4BF383
23BE2E
20C6B6
D472A3
438B3A
16CECA
545F37
25D222
D9E2DD
8EE935
BE70B0
84EB7A
68B026
8AC06F
983DCF
96703A
0AEB84
2788F1
26F5DC
F82BA7
36B63A
F89980
376951
52B19C
47CA4A
79ECCD
859D5F
405025
128D82
75FEA3
2BA5DE
F15A1A
F12EEB
DAEC9F
008FDC
97CE61
438396
CFE0F3
546A16
561034
A3DA46
9AA062
F13101
77BEA2
223B51
D50A27
F675C6
EA87DB
1BF394
D04443
183686
0F0570
EEB673
7546ED
46B963
01BB17
1B6046
CCAA89
30A4A1
001DEE
6B2AAD