mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
edit: true retention colorblind selection is now viridis
This commit is contained in:
parent
14856062d3
commit
d01c1c5075
1 changed files with 5 additions and 3 deletions
|
@ -16,7 +16,7 @@ import {
|
|||
axisRight,
|
||||
curveBasis,
|
||||
interpolateBlues,
|
||||
interpolatePurples,
|
||||
interpolateViridis,
|
||||
pointer,
|
||||
scaleBand,
|
||||
scaleLinear,
|
||||
|
@ -84,16 +84,18 @@ export function renderHours(
|
|||
.classed(oddTickClass, (d: any): boolean => d % 2 != 0)
|
||||
.attr("direction", "ltr");
|
||||
|
||||
let cappedRange = scaleLinear().range([0.1, 0.8]);
|
||||
let cappedRange;
|
||||
let colour;
|
||||
const isColorBlindMode = (window as any).colorBlindMode;
|
||||
|
||||
if(isColorBlindMode) {
|
||||
colour = scaleSequential((n) => interpolatePurples(cappedRange(n)!)).domain([
|
||||
cappedRange = scaleLinear().range([0.0, 1]);
|
||||
colour = scaleSequential((n) => interpolateViridis(cappedRange(n)!)).domain([
|
||||
0,
|
||||
yMax,
|
||||
]);
|
||||
} else {
|
||||
cappedRange = scaleLinear().range([0.1, 0.8]);
|
||||
colour = scaleSequential((n) => interpolateBlues(cappedRange(n)!)).domain([
|
||||
0,
|
||||
yMax,
|
||||
|
|
Loading…
Reference in a new issue