I have a simple 2-color map showing which candidates won in which precinct. Now I want to make one showing margin of victory within a precinct. So if candidate A won by a lot it would be dark green, if candidate A won by a little it would be light green, if candidate B won by a lot it would be dark yellow and if candidate B won by a little it would be light yellow. (These are local elections so red and blue don't make sense). I used color brewer to pick my initial two color scheme. I have zero design sense. How do I go about picking the colors for the margin of victory map?

  • You would probably have to standardize your data first so you can define "a lot" or "a little" by a number/ratio/percent. Then you could define your margin of victory upper/lower class breaks and then color your classes accordingly.
    – user21646
    Commented Mar 19, 2014 at 1:55
  • @JasparKatt can you say about the appropriate way to standardize this kind of data. How do I decide what the bins should be?
    – bernie2436
    Commented Mar 19, 2014 at 2:02

2 Answers 2


If you need to get color dynamically on a website, I would give you the advice of using the excellent chroma.js library. The library is easy to use and implements a scale mechanism which would fit to your needs :

scale = new chroma.ColorScale({
colors: ['#F7E1C5', '#6A000B']

There is the ColorBrewer Option in QGIS:

From the Layer Properties > Style > choose Categorized > from Colour Ramp choose New Colour Ramp > Select type Colour Brewer:

enter image description here

Or use the ColorBrewer website: http://colorbrewer2.org/

Pick a diverging colour scheme, maybe 5 data classes, then pick a colour scheme...

You can use those colours in whatever your mapping client is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.