Skip to content

Commit fcaf88a

Browse files
authored
Change default colormap from 'cool' to 'viridis' (#828)
* Change default colormap from 'cool' to 'viridis' Viridis is the Matplotlib default. It's a beautiful colormap that is colorblind-friendly and perceptually uniform. * Update test to use "viridis" color ramp
1 parent 22f1562 commit fcaf88a

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

packages/base/src/dialogs/symbology/components/color_ramp/ColorRamp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const ColorRamp: React.FC<IColorRampProps> = ({
5151
}
5252
setNumberOfShades(nClasses ? nClasses : '9');
5353
setSelectedMode(singleBandMode ? singleBandMode : 'equal interval');
54-
setSelectedRamp(colorRamp ? colorRamp : 'cool');
54+
setSelectedRamp(colorRamp ? colorRamp : 'viridis');
5555
};
5656

5757
return (

packages/base/src/dialogs/symbology/vector_layer/types/Heatmap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Heatmap: React.FC<ISymbologyDialogProps> = ({
2323
radius: 8,
2424
blur: 15,
2525
});
26-
const selectedRampRef = useRef('cool');
26+
const selectedRampRef = useRef('viridis');
2727
const heatmapOptionsRef = useRef({
2828
radius: 8,
2929
blur: 15,
@@ -55,7 +55,7 @@ const Heatmap: React.FC<ISymbologyDialogProps> = ({
5555
colorRamp = layer.parameters.symbologyState.colorRamp;
5656
}
5757

58-
setSelectedRamp(colorRamp ? colorRamp : 'cool');
58+
setSelectedRamp(colorRamp ? colorRamp : 'viridis');
5959
};
6060

6161
const handleOk = () => {

packages/schema/src/schema/project/layers/heatmapLayer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"colorRamp": {
4646
"type": "string",
47-
"default": "cool"
47+
"default": "viridis"
4848
}
4949
}
5050
}

packages/schema/src/schema/project/layers/vectorLayer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"colorRamp": {
4141
"type": "string",
42-
"default": "cool"
42+
"default": "viridis"
4343
},
4444
"nClasses": {
4545
"type": "string",

packages/schema/src/schema/project/layers/webGlLayer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
},
7878
"colorRamp": {
7979
"type": "string",
80-
"default": "cool"
80+
"default": "viridis"
8181
},
8282
"nClasses": {
8383
"type": "string",

python/jupytergis_qgis/jupytergis_qgis/qgis_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def qgis_layer_to_jgis(
212212
case_conditions.append([r, g, b, a / 255])
213213

214214
layer_parameters["symbologyState"] = {
215-
"colorRamp": "cool",
215+
"colorRamp": "viridis",
216216
"mode": "",
217217
"nClasses": "",
218218
"renderType": "Categorized",

python/jupytergis_qgis/jupytergis_qgis/tests/test_qgis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def test_qgis_saver():
302302
"opacity": 1.0,
303303
"source": source_ids[6],
304304
"symbologyState": {
305-
"colorRamp": "cool",
305+
"colorRamp": "viridis",
306306
"mode": "",
307307
"nClasses": "",
308308
"renderType": "Categorized",

0 commit comments

Comments
 (0)