fix(ui): use solid party badge colors readable in light and dark mode

Replaces light/dark variant classes (which produced unreadable pale pink
in dark mode) with solid saturated colors: red-600 for Republicans,
blue-600 for Democrats, slate-500 for Independents — all with white text.

Authored-By: Jack Levy
This commit is contained in:
Jack Levy
2026-02-28 22:57:10 -05:00
parent e91e202eb4
commit 5cc6d13b3b

View File

@@ -39,9 +39,9 @@ export function partyColor(party?: string): string {
export function partyBadgeColor(party?: string): string {
if (!party) return "bg-muted text-muted-foreground";
const p = party.toLowerCase();
if (p.includes("democrat") || p === "d") return "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";
if (p.includes("republican") || p === "r") return "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";
return "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";
if (p.includes("democrat") || p === "d") return "bg-blue-600 text-white";
if (p.includes("republican") || p === "r") return "bg-red-600 text-white";
return "bg-slate-500 text-white";
}
export function trendColor(score?: number): string {