From 26311257e579aac4efe2f5cf618f83585766f177 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Sun, 26 Jul 2026 22:11:54 -0400 Subject: [PATCH] test(theme): assert AccentPrimary/Secondary/Tertiary clear 3:1 floor on bg/panel --- tests/test_theme.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_theme.cpp b/tests/test_theme.cpp index 70454bb..1d16075 100644 --- a/tests/test_theme.cpp +++ b/tests/test_theme.cpp @@ -77,6 +77,13 @@ static void testAccentsClearIndicatorFloorOnCell() { // The primary accent also leads the mode-switch/tab active fill drawn over bg/base. CHECK(contrastRatio(roleColor(Role::AccentPrimary), roleColor(Role::BgBase)) >= textFloor(TextClass::Large)); + // bank_panel draws categorical accents as text on bg/panel (region-title band): + // AccentSecondary/Tertiary as region-title text; AccentPrimary as the "Active:" readout. + // Verify all three clear the 3:1 large/indicator floor on bg/panel (the ACTUAL draw surface). + for (Role a : {Role::AccentPrimary, Role::AccentSecondary, Role::AccentTertiary}) { + CHECK(contrastRatio(roleColor(a), roleColor(Role::BgPanel)) + >= textFloor(TextClass::Large)); + } } // Text drawn ON a pastel accent fill (retained tight pair, re-verified for the pastels):