chaged hard coded true retention colors to dynamic colorBlindColors

This commit is contained in:
Matthis 2025-08-14 13:22:07 +02:00
parent efa3b2f4de
commit 8e3180e446
2 changed files with 6 additions and 4 deletions

View file

@ -3,6 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { colorBlindColors, type GraphBounds } from "./graph-helpers";
import * as tr from "@generated/ftl";
import { localizedNumber } from "@tslib/i18n";
import { type RevlogRange } from "./graph-helpers";
@ -30,8 +31,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
onMount(() => {
const isColorBlindMode = (window as any).colorBlindMode;
if (isColorBlindMode) {
youngColor = "#44ab9a";
matureColor = "#127733";
youngColor = colorBlindColors.young;
matureColor = colorBlindColors.mature;
}
// Set globally so scoped SCSS can use them
document.documentElement.style.setProperty("--young-color", youngColor);

View file

@ -1,4 +1,5 @@
<script lang="ts">
import { colorBlindColors, type GraphBounds } from "./graph-helpers";
import * as tr from "@generated/ftl";
import { type RevlogRange } from "./graph-helpers";
import {
@ -29,8 +30,8 @@
onMount(() => {
const isColorBlindMode = (window as any).colorBlindMode;
if (isColorBlindMode) {
passColor = "#127733";
failColor = "#cb6676";
passColor = colorBlindColors.relearn;
failColor = colorBlindColors.filtered;
}
// Apply them to document root so SCSS can see them
document.documentElement.style.setProperty("--pass-color", passColor);