Post
.badge { background: var(--accent); color: contrast-color(var(--accent)); } Which of white or black wins on a mid-tone background is the browser’s call, not yours.
0 reposts0 likes
One more thing the name does not say: it maximizes contrast, it guarantees none. Against a mid-gray background the winner clears no bar, it just loses less. Verdict: Hold. Pick the text color yourself and you know what it will be. cleared.page/2026-04/