Skip to content

Commit

Permalink
update heatmap color purple
Browse files Browse the repository at this point in the history
  • Loading branch information
shami-sneha committed Nov 19, 2023
1 parent 06d3904 commit 684b066
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
45 changes: 23 additions & 22 deletions frontend/public/assets/heatmap_legend_presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,28 +369,7 @@
{"color": "rgb(126,0,47)", "value": 15}
]
},
{
"name": "Purples",
"isNormalized": true,
"steps": [
{"color": "rgb(251,250,253)", "value": 0},
{"color": "rgb(245,243,248)", "value": 1},
{"color": "rgb(238,236,244)", "value": 2},
{"color": "rgb(228,227,239)", "value": 3},
{"color": "rgb(217,217,234)", "value": 4},
{"color": "rgb(202,203,227)", "value": 5},
{"color": "rgb(187,188,219)", "value": 6},
{"color": "rgb(172,171,209)", "value": 7},
{"color": "rgb(157,153,199)", "value": 8},
{"color": "rgb(142,139,192)", "value": 9},
{"color": "rgb(127,124,185)", "value": 10},
{"color": "rgb(116,102,174)", "value": 11},
{"color": "rgb(105,80,162)", "value": 12},
{"color": "rgb(94,58,152)", "value": 13},
{"color": "rgb(83,37,142)", "value": 14},
{"color": "rgb(72,18,133)", "value": 15}
]
},

{
"name": "RdBu",
"isNormalized": true,
Expand Down Expand Up @@ -1512,5 +1491,27 @@
{"color": "rgb(0,223,143)", "value": 14},
{"color": "rgb(0,240,134)", "value": 15}
]
},
{
"name": "Purples",
"isNormalized": true,
"steps": [
{"color": "rgb(251,250,253)", "value": 0},
{"color": "rgb(245,243,248)", "value": 1},
{"color": "rgb(238,236,244)", "value": 2},
{"color": "rgb(228,227,239)", "value": 3},
{"color": "rgb(217,217,234)", "value": 4},
{"color": "rgb(202,203,227)", "value": 5},
{"color": "rgb(187,188,219)", "value": 6},
{"color": "rgb(172,171,209)", "value": 7},
{"color": "rgb(157,153,199)", "value": 8},
{"color": "rgb(142,139,192)", "value": 9},
{"color": "rgb(127,124,185)", "value": 10},
{"color": "rgb(116,102,174)", "value": 11},
{"color": "rgb(105,80,162)", "value": 12},
{"color": "rgb(94,58,152)", "value": 13},
{"color": "rgb(83,37,142)", "value": 14},
{"color": "rgb(72,18,133)", "value": 15}
]
}
]
2 changes: 1 addition & 1 deletion frontend/src/components/Sidebar/HeatLegendEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function useDefaultLegends(): Array<HeatmapLegend> {
const legends: Array<HeatmapLegend> = [];
const stepCount = theme.custom.scenarios[0].length - 1;
for (const element of theme.custom.scenarios) {
const steps = [];
const steps: Array<{ color: string; value: number }> = [];
for (let j = 0; j < stepCount; j++) {
steps.push({color: element[stepCount - 1 - j], value: j / (stepCount - 1)});
}
Expand Down

0 comments on commit 684b066

Please sign in to comment.