Skip to content

Commit

Permalink
Add perceptually uniform colormaps to default styles
Browse files Browse the repository at this point in the history
Adds the Viridis, Magma, Plasma and Inferno uniform color ramps
created by Stéfan van der Walt and Nathaniel Smith

See https://bids.github.io/colormap/ for more details

Note that I've thinned out the stops here, and only kept
every 5th stop from the original ramps
  • Loading branch information
nyalldawson committed Oct 11, 2016
1 parent 9263abe commit 60cc853
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Binary file modified resources/symbology-ng-style.db
Binary file not shown.
24 changes: 24 additions & 0 deletions resources/symbology-ng-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1430,5 +1430,29 @@
<prop k="discrete" v="0"/>
<prop k="stops" v="0.25;254,204,92,255:0.5;253,141,60,255:0.75;240,59,32,255"/>
</colorramp>
<colorramp name="Inferno" type="gradient">
<prop v="0,0,4,255" k="color1"/>
<prop v="252,255,164,255" k="color2"/>
<prop v="0" k="discrete"/>
<prop v="0.0196078;2,2,12,255:0.0392157;5,4,23,255:0.0588235;10,7,34,255:0.0784314;16,9,45,255:0.0980392;22,11,57,255:0.117647;30,12,69,255:0.137255;38,12,81,255:0.156863;47,10,91,255:0.176471;56,9,98,255:0.196078;64,10,103,255:0.215686;73,11,106,255:0.235294;81,14,108,255:0.254902;89,16,110,255:0.27451;97,19,110,255:0.294118;105,22,110,255:0.313725;113,25,110,255:0.333333;120,28,109,255:0.352941;128,31,108,255:0.372549;136,34,106,255:0.392157;144,37,104,255:0.411765;152,39,102,255:0.431373;160,42,99,255:0.45098;168,46,95,255:0.470588;176,49,91,255:0.490196;183,53,87,255:0.509804;191,57,82,255:0.529412;198,61,77,255:0.54902;204,66,72,255:0.568627;211,71,67,255:0.588235;217,77,61,255:0.607843;223,83,55,255:0.627451;228,90,49,255:0.647059;233,97,43,255:0.666667;237,105,37,255:0.686275;241,113,31,255:0.705882;244,121,24,255:0.72549;247,130,18,255:0.745098;249,139,11,255:0.764706;250,148,7,255:0.784314;251,157,7,255:0.803922;252,166,12,255:0.823529;252,176,20,255:0.843137;251,186,31,255:0.862745;250,196,42,255:0.882353;248,205,55,255:0.901961;246,215,70,255:0.921569;244,225,86,255:0.941176;242,234,105,255:0.960784;242,242,125,255:0.980392;245,249,146,255" k="stops"/>
</colorramp>
<colorramp name="Magma" type="gradient">
<prop v="0,0,4,255" k="color1"/>
<prop v="252,253,191,255" k="color2"/>
<prop v="0" k="discrete"/>
<prop v="0.0196078;2,2,11,255:0.0392157;5,4,22,255:0.0588235;9,7,32,255:0.0784314;14,11,43,255:0.0980392;20,14,54,255:0.117647;26,16,66,255:0.137255;33,17,78,255:0.156863;41,17,90,255:0.176471;49,17,101,255:0.196078;57,15,110,255:0.215686;66,15,117,255:0.235294;74,16,121,255:0.254902;82,19,124,255:0.27451;90,22,126,255:0.294118;98,25,128,255:0.313725;106,28,129,255:0.333333;114,31,129,255:0.352941;121,34,130,255:0.372549;129,37,129,255:0.392157;137,40,129,255:0.411765;145,43,129,255:0.431373;153,45,128,255:0.45098;161,48,126,255:0.470588;170,51,125,255:0.490196;178,53,123,255:0.509804;186,56,120,255:0.529412;194,59,117,255:0.54902;202,62,114,255:0.568627;210,66,111,255:0.588235;217,70,107,255:0.607843;224,76,103,255:0.627451;231,82,99,255:0.647059;236,88,96,255:0.666667;241,96,93,255:0.686275;244,105,92,255:0.705882;247,114,92,255:0.72549;249,123,93,255:0.745098;251,133,96,255:0.764706;252,142,100,255:0.784314;253,152,105,255:0.803922;254,161,110,255:0.823529;254,170,116,255:0.843137;254,180,123,255:0.862745;254,189,130,255:0.882353;254,198,138,255:0.901961;254,207,146,255:0.921569;254,216,154,255:0.941176;253,226,163,255:0.960784;253,235,172,255:0.980392;252,244,182,255" k="stops"/>
</colorramp>
<colorramp name="Plasma" type="gradient">
<prop v="13,8,135,255" k="color1"/>
<prop v="240,249,33,255" k="color2"/>
<prop v="0" k="discrete"/>
<prop v="0.0196078;27,6,141,255:0.0392157;38,5,145,255:0.0588235;47,5,150,255:0.0784314;56,4,154,255:0.0980392;65,4,157,255:0.117647;73,3,160,255:0.137255;81,2,163,255:0.156863;89,1,165,255:0.176471;97,0,167,255:0.196078;105,0,168,255:0.215686;113,0,168,255:0.235294;120,1,168,255:0.254902;128,4,168,255:0.27451;135,7,166,255:0.294118;142,12,164,255:0.313725;149,17,161,255:0.333333;156,23,158,255:0.352941;162,29,154,255:0.372549;168,34,150,255:0.392157;174,40,146,255:0.411765;180,46,141,255:0.431373;186,51,136,255:0.45098;191,57,132,255:0.470588;196,62,127,255:0.490196;201,68,122,255:0.509804;205,74,118,255:0.529412;210,79,113,255:0.54902;214,85,109,255:0.568627;218,91,105,255:0.588235;222,97,100,255:0.607843;226,102,96,255:0.627451;230,108,92,255:0.647059;233,114,87,255:0.666667;237,121,83,255:0.686275;240,127,79,255:0.705882;243,133,75,255:0.72549;245,140,70,255:0.745098;247,147,66,255:0.764706;249,154,62,255:0.784314;251,161,57,255:0.803922;252,168,53,255:0.823529;253,175,49,255:0.843137;254,183,45,255:0.862745;254,190,42,255:0.882353;253,198,39,255:0.901961;252,206,37,255:0.921569;251,215,36,255:0.941176;248,223,37,255:0.960784;246,232,38,255:0.980392;243,240,39,255" k="stops"/>
</colorramp>
<colorramp name="Viridis" type="gradient">
<prop v="68,1,84,255" k="color1"/>
<prop v="253,231,37,255" k="color2"/>
<prop v="0" k="discrete"/>
<prop v="0.0196078;70,8,92,255:0.0392157;71,16,99,255:0.0588235;72,23,105,255:0.0784314;72,29,111,255:0.0980392;72,36,117,255:0.117647;71,42,122,255:0.137255;70,48,126,255:0.156863;69,55,129,255:0.176471;67,61,132,255:0.196078;65,66,135,255:0.215686;63,72,137,255:0.235294;61,78,138,255:0.254902;58,83,139,255:0.27451;56,89,140,255:0.294118;53,94,141,255:0.313725;51,99,141,255:0.333333;49,104,142,255:0.352941;46,109,142,255:0.372549;44,113,142,255:0.392157;42,118,142,255:0.411765;41,123,142,255:0.431373;39,128,142,255:0.45098;37,132,142,255:0.470588;35,137,142,255:0.490196;33,142,141,255:0.509804;32,146,140,255:0.529412;31,151,139,255:0.54902;30,156,137,255:0.568627;31,161,136,255:0.588235;33,165,133,255:0.607843;36,170,131,255:0.627451;40,174,128,255:0.647059;46,179,124,255:0.666667;53,183,121,255:0.686275;61,188,116,255:0.705882;70,192,111,255:0.72549;80,196,106,255:0.745098;90,200,100,255:0.764706;101,203,94,255:0.784314;112,207,87,255:0.803922;124,210,80,255:0.823529;137,213,72,255:0.843137;149,216,64,255:0.862745;162,218,55,255:0.882353;176,221,47,255:0.901961;189,223,38,255:0.921569;202,225,31,255:0.941176;216,226,25,255:0.960784;229,228,25,255:0.980392;241,229,29,255" k="stops"/>
</colorramp>
</colorramps>
</qgis_style>

1 comment on commit 60cc853

@megies
Copy link

@megies megies commented on 60cc853 Jul 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. I have QGIS installed via Debian packages and keep updating them but I seem to be lacking those matplotlib colormaps.. no big deal, I just followed these instructions to add them, but I was wondering why they weren't there out of the box, as it seems they've been added by default a long time ago..

Please sign in to comment.