test(theme): assert AccentPrimary/Secondary/Tertiary clear 3:1 floor on bg/panel
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user