Mercurial > hg > svgui
changeset 1013:ac69043f82b6 colourschemes
Provide a sensible name for this colour scheme
author | Chris Cannam |
---|---|
date | Tue, 19 Jan 2016 12:56:19 +0000 |
parents | 2a85ab180d08 |
children | 6338d7dc3b6d |
files | layer/ColourMapper.cpp layer/ColourMapper.h |
diffstat | 2 files changed, 8 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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<QString> 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<QColor> convertStrings(const vector<QString> &strs) { vector<QColor> converted; @@ -44,7 +33,10 @@ return converted; } -static vector<QColor> ylGnBu = convertStrings(ylGnBuS); +static vector<QColor> 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<QColor> &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("<unknown>"); @@ -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) {