fix(stammbaum): raise dimmed opacity to 0.45 and bind tests to the constant (#703)

Bump DIMMED_OPACITY 0.4 -> 0.45 so dimmed outlines/labels stay legible
against bg-surface in both themes (dark mode dims already-light mint, the
riskier case). Import the constant into StammbaumTree.svelte.test.ts so the
node-opacity assertions track it instead of a hard-coded '0.4'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-31 19:13:49 +02:00
parent 9c12f62345
commit 10249c33be
2 changed files with 8 additions and 5 deletions

View File

@@ -16,11 +16,13 @@ import type { components } from '$lib/generated/api';
type RelationshipDTO = components['schemas']['RelationshipDTO'];
/**
* Opacity applied to dimmed nodes and connectors. ~0.4 keeps names legible while
* clearly de-emphasised, and works as a lightness cue in both themes (the colour
* tokens are theme-aware) so the cue does not rely on hue (WCAG 1.4.1 / NFR-A11Y-001).
* Opacity applied to dimmed node outlines/labels and connectors. 0.45 keeps names
* legible against bg-surface in both themes (dark mode dims already-light mint, the
* riskier case) while clearly de-emphasised, and works as a lightness cue so the cue
* does not rely on hue (WCAG 1.4.1 / NFR-A11Y-001). The dim is applied to the node's
* outline + labels only — the card fill stays opaque, see StammbaumNode.svelte.
*/
export const DIMMED_OPACITY = 0.4;
export const DIMMED_OPACITY = 0.45;
/** Adjacency index over the family graph, built once per edge set. */
export type LineageIndex = {