fix(a11y): darken avatar palette teal for AA contrast against white

#007596 with white initials hits ~4.5:1 — at the AA threshold for
small text. #005F74 lifts it comfortably above 5:1, matching the
contrast margin of the other four palette entries.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-08 12:49:40 +02:00
committed by marcel
parent 7bd477d24e
commit d554fc7e6b

View File

@@ -2,7 +2,7 @@
import type { components } from '$lib/generated/api'; import type { components } from '$lib/generated/api';
import * as m from '$lib/paraglide/messages.js'; import * as m from '$lib/paraglide/messages.js';
const AVATAR_PALETTE = ['#012851', '#5A3080', '#007596', '#2A6040', '#803020'] as const; const AVATAR_PALETTE = ['#012851', '#5A3080', '#005F74', '#2A6040', '#803020'] as const;
function djb2(str: string): number { function djb2(str: string): number {
let hash = 5381; let hash = 5381;
for (let i = 0; i < str.length; i++) hash = (hash * 33) ^ str.charCodeAt(i); for (let i = 0; i < str.length; i++) hash = (hash * 33) ^ str.charCodeAt(i);