diff --git a/ftl/core/preferences.ftl b/ftl/core/preferences.ftl
index ce24df434..75420fa63 100644
--- a/ftl/core/preferences.ftl
+++ b/ftl/core/preferences.ftl
@@ -60,6 +60,7 @@ preferences-full-screen-only = Full screen only
preferences-appearance = Appearance
preferences-general = General
preferences-style = Style
+preferences-color-blind = Color Blind Mode
preferences-review = Review
preferences-answer-keys = Answer keys
preferences-distractions = Distractions
diff --git a/qt/aqt/forms/preferences.ui b/qt/aqt/forms/preferences.ui
index 807d4093c..a5d677328 100644
--- a/qt/aqt/forms/preferences.ui
+++ b/qt/aqt/forms/preferences.ui
@@ -104,6 +104,23 @@
preferences_user_interface
+ -
+
+
+ preferences_style
+
+
+ styleComboBox
+
+
+
+ -
+
+
+
+
+
+
-
@@ -123,23 +140,6 @@
- -
-
-
-
-
-
-
- -
-
-
- preferences_style
-
-
- styleComboBox
-
-
-
-
@@ -160,13 +160,26 @@
- -
+
-
preferences_reset_window_sizes
+ -
+
+
+
+ 0
+ 0
+
+
+
+ preferences_color_blind
+
+
+
diff --git a/ts/routes/graphs/calendar.ts b/ts/routes/graphs/calendar.ts
index 863923095..dcef8d13b 100644
--- a/ts/routes/graphs/calendar.ts
+++ b/ts/routes/graphs/calendar.ts
@@ -20,6 +20,7 @@ import {
timeSaturday,
timeSunday,
timeYear,
+ interpolateMagma
} from "d3";
import type { GraphBounds, SearchDispatch } from "./graph-helpers";
@@ -136,10 +137,10 @@ export function renderCalendar(
}
}
const data = Array.from(dayMap.values());
- const cappedRange = scaleLinear().range([0.2, nightMode ? 0.8 : 1]);
+ const cappedRange = scaleLinear().range([1,0]);
const blues = scaleSequentialSqrt()
.domain([0, maxCount])
- .interpolator((n) => interpolateBlues(cappedRange(n)!));
+ .interpolator((n) => interpolateMagma(cappedRange(n)!));
function tooltipText(d: DayDatum): string {
const date = localizedDate(d.date, {
diff --git a/ts/routes/graphs/future-due.ts b/ts/routes/graphs/future-due.ts
index 6100470b7..5b927a2f2 100644
--- a/ts/routes/graphs/future-due.ts
+++ b/ts/routes/graphs/future-due.ts
@@ -10,7 +10,7 @@ import * as tr from "@generated/ftl";
import { localizedNumber } from "@tslib/i18n";
import { dayLabel } from "@tslib/time";
import type { Bin } from "d3";
-import { bin, extent, interpolateGreens, scaleLinear, scaleSequential, sum } from "d3";
+import { bin, extent, interpolateGreens, scaleLinear, scaleSequential, sum, interpolateViridis } from "d3";
import type { SearchDispatch, TableDatum } from "./graph-helpers";
import { getNumericMapBinValue, GraphRange, numericMap } from "./graph-helpers";
@@ -108,8 +108,9 @@ export function buildHistogram(
}
const xTickFormat = (n: number): string => localizedNumber(n);
- const adjustedRange = scaleLinear().range([0.7, 0.3]);
- const colourScale = scaleSequential((n) => interpolateGreens(adjustedRange(n)!)).domain([xMin!, xMax!]);
+
+ const adjustedRange = scaleLinear().range([0.0, 1]);
+ const colourScale = scaleSequential((n) => interpolateViridis(adjustedRange(n)!)).domain([xMin!, xMax!]);
const total = sum(bins as any, getNumericMapBinValue);