# HG changeset patch # User Chris Cannam # Date 1453208179 0 # Node ID ac69043f82b65bd68cb52aaf940c5d3083de0be0 # Parent 2a85ab180d08d990d778ae9c9f3be5cca4a5adb1 Provide a sensible name for this colour scheme diff -r 2a85ab180d08 -r ac69043f82b6 layer/ColourMapper.cpp --- a/layer/ColourMapper.cpp Wed Dec 02 15:01:38 2015 +0000 +++ b/layer/ColourMapper.cpp Tue Jan 19 12:56:19 2016 +0000 @@ -25,17 +25,6 @@ using namespace std; -static vector ylGnBuS { -// this is ylGnBu 9 -// "#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081" - - "#ffffff", "#ffff00", "#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081","#042040" - -// this is PuOr 11 -// "#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b" - }; - - static vector convertStrings(const vector &strs) { vector converted; @@ -44,7 +33,10 @@ return converted; } -static vector ylGnBu = convertStrings(ylGnBuS); +static vector xRay = convertStrings({ + // Based on ColorBrewer ylGnBu scale + "#ffffff", "#ffff00", "#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081","#042040" + }); static void mapDiscrete(double norm, vector &colours, double &r, double &g, double &b) @@ -104,7 +96,7 @@ case Highlight: return tr("Highlight"); case Printer: return tr("Printer"); case HighGain: return tr("High Gain"); - case YlGnBu: return tr("YlGnBu"); + case XRay: return tr("X-Ray"); } return tr(""); @@ -250,9 +242,9 @@ */ break; - case YlGnBu: + case XRay: hsv = false; - mapDiscrete(norm, ylGnBu, r, g, b); + mapDiscrete(norm, xRay, r, g, b); } if (hsv) { diff -r 2a85ab180d08 -r ac69043f82b6 layer/ColourMapper.h --- a/layer/ColourMapper.h Wed Dec 02 15:01:38 2015 +0000 +++ b/layer/ColourMapper.h Tue Jan 19 12:56:19 2016 +0000 @@ -45,7 +45,7 @@ Highlight, Printer, HighGain, - YlGnBu, + XRay, }; int getMap() const { return m_map; }