From 339520b119c02a076591956adc14d8786f24438a Mon Sep 17 00:00:00 2001 From: OblivionSword Date: Mon, 11 Aug 2025 17:26:11 +0200 Subject: [PATCH] slight change to the colorblind friendly color pallete for card count --- ts/routes/graphs/card-counts.ts | 4 +++- ts/routes/graphs/ease.ts | 2 +- ts/routes/graphs/intervals.ts | 5 ----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ts/routes/graphs/card-counts.ts b/ts/routes/graphs/card-counts.ts index 0bd400f8a..797e8b61a 100644 --- a/ts/routes/graphs/card-counts.ts +++ b/ts/routes/graphs/card-counts.ts @@ -18,6 +18,7 @@ import { schemeGreens, schemeOranges, schemeReds, + schemePuRd, schemePurples, schemeBuPu, select, @@ -40,7 +41,8 @@ if((window as any).colorBlindMode) barColours = [ schemeBlues[5][2], /* new */ schemeOranges[5][2], /* learn */ - schemeReds[5][2], /* relearn */ + //schemeReds[5][2], /* relearn */ + schemePuRd[9][7], schemePurples[7][4], /* young */ schemeBuPu[8][6], /* mature */ "#00FF60", /* suspended */ diff --git a/ts/routes/graphs/ease.ts b/ts/routes/graphs/ease.ts index 4d2739191..a37f6ac6e 100644 --- a/ts/routes/graphs/ease.ts +++ b/ts/routes/graphs/ease.ts @@ -9,7 +9,7 @@ import type { GraphsResponse } from "@generated/anki/stats_pb"; import * as tr from "@generated/ftl"; import { localizedNumber } from "@tslib/i18n"; import type { Bin, ScaleLinear, ScaleSequential } from "d3"; -import { bin, extent, interpolateRdYlGn, interpolateTurbo, scaleLinear, scaleSequential, sum } from "d3"; +import { bin, extent, interpolateRdYlGn, interpolateTurbo, interpolateViridis, scaleLinear, scaleSequential, sum } from "d3"; import type { SearchDispatch, TableDatum } from "./graph-helpers"; import { getNumericMapBinValue, numericMap } from "./graph-helpers"; diff --git a/ts/routes/graphs/intervals.ts b/ts/routes/graphs/intervals.ts index 8a806a168..8c9f1038b 100644 --- a/ts/routes/graphs/intervals.ts +++ b/ts/routes/graphs/intervals.ts @@ -161,11 +161,6 @@ export function prepareIntervalData( colourScale = scaleSequential((n) => interpolateBlues(adjustedRange(n)!)).domain([xMax!, xMin!]); } - //const adjustedRange = scaleLinear().range([0.7, 0.3]); - //const adjustedRange = scaleLinear().range([0.1, 1.0]); - //const colourScale = scaleSequential((n) => interpolateBlues(adjustedRange(n)!)).domain([xMax!, xMin!]); - //const colourScale = scaleSequential((n) => interpolateCividis(adjustedRange(n)!)).domain([xMax!, xMin!]); - function hoverText( bin: Bin, _cumulative: number,