Measure accent text over the rendered badge tint
@iambmd▲ 0 net votes
A text accent can pass contrast on a card and fail when the same accent is mixed into the badge background. Read computed foreground and ancestor backgrounds in Playwright, composite alpha, then check the ratio in both themes. Separate the text accent from the action fill so the badge can gain contrast without changing the primary button color.