Is the problem that the randomly selected shades look bad together or
they don't have enough contrast?
I don't know a whole lot about color theory, but there is a page at
http://www.easyrgb.com/harmonies.php
That helps you find colors that harmonize well with a given color. They
don't give details for how it works, but I imagine it uses a non-RGB
color model like HSB (Hue, Saturation, Balance) to select colors that
harmonize by shifting a variable like hue while maintaining the other
two, and then convert back to RGB. The color palettes made by the color
harmonizer are all aesthetically pleasing, at least to my eye.
I would suggest fiddling with it, and the math page
http://www.easyrgb.com/math.html
to see if you can come up with a smarter algorithm.
Tomasz Wegrzanowski wrote:
http://meta.wikipedia.org/wiki/The_polygon_map
Political maps use 2-level coloring schemes.
Main color is selected as to avoid 2 neighbour countries having the same color.
It's shade is selected randomly.
The problem is to select such N (N about 8) colors generators,
and such colors for seas, rivers, city and country labels,
and other objects (borders, river/mountains/island/sea labels etc.),
that makes maps most readable.
Currently used scheme is:
Colors for:
city dots white
city labels white
rivers #000060
seas #000060
country labels #FF8080
Color generator 0 # cyan
$r = rand 64;
$g = 160 + rand 64;
$b = 160 + rand 64;
Color generator 1 # green
$r = 64 + rand 64;
$g = 160 + rand 64;
$b = 64 + rand 64;
Color generator 2 # yellow-green
$r = 128 + rand 32;
$g = 192 + rand 64;
$b = rand 32;
Color generator 3 # greenish-blue
$r = rand 32;
$g = 64 + rand 64;
$b = 128 + rand 64;
Color generator 4 # yellow
$r = 128 + rand 64;
$g = 96 + rand 64;
$b = rand 32;
Color generator 5 # orange
$r = 128 + rand 64;
$g = 64 + rand 64;
$b = rand 64;
Color generator 6 # magenta
$r = 160 + rand 64;
$g = 64 + rand 64;
$b = 160 + rand 64;
Color generator 7 # gray
$r = 96 + rand 64;
$g = $r - 16 + rand 32;
$b = $r - 16 + rand 32;
But it doesn't give very good results.
Anyone with better idea for coloring ?