diff --git a/src/components/targets/__tests__/range-bar.test.tsx b/src/components/targets/__tests__/range-bar.test.tsx index dcd317315..ac03547b7 100644 --- a/src/components/targets/__tests__/range-bar.test.tsx +++ b/src/components/targets/__tests__/range-bar.test.tsx @@ -20,7 +20,7 @@ function render(props: Parameters[0]) { } describe("", () => { - it("renders the bar slot + green/yellow/red zones", () => { + it("renders the bar slot + green/orange/red zones with Dracula tokens", () => { const html = render({ value: 72, min: 60, @@ -28,8 +28,14 @@ describe("", () => { unit: "bpm", }); expect(html).toContain('data-slot="target-range-bar"'); - expect(html).toContain("bg-green-500/20"); - expect(html).toContain("bg-yellow-500/12"); + expect(html).toContain("bg-dracula-green/20"); + expect(html).toContain("bg-dracula-orange/15"); + expect(html).toContain("bg-dracula-red/10"); + // Pin the absence of the legacy raw Tailwind palette so the swap + // doesn't silently regress on future merges. + expect(html).not.toContain("bg-green-500/20"); + expect(html).not.toContain("bg-yellow-500/12"); + expect(html).not.toContain("bg-red-500/8"); }); it("paints the marker with the green token when the value is in range", () => { diff --git a/src/components/targets/range-bar.tsx b/src/components/targets/range-bar.tsx index 56bf4842a..2adc4f62b 100644 --- a/src/components/targets/range-bar.tsx +++ b/src/components/targets/range-bar.tsx @@ -99,26 +99,30 @@ export function RangeBar({ return (
- {/* Red background (full bar) */} -
- {/* Yellow zones */} + {/* Red background (full bar) — Dracula `--dracula-red` so the + chart palette stays aligned with PR-badge, alerts, and the + marker dot itself. Raw Tailwind palettes drift from the + theme over time and never get dark-mode tuned. */} +
+ {/* Orange (caution) side zones — `--dracula-orange` matches the + marker's out-of-band tint. */}
- {/* Green zone */} + {/* In-band green zone — `--dracula-green`. */}