Here's the math needed to adjust a color's lightness and eliminate the gray area where WCAG2 and APCA conflict on black/white foregrounds.
Yes, it's CSS. And yes, it's blazingly fast.
Usage:
background: oklch(from <color> var(--_ak-safe-l) c h);
Here's the math needed to adjust a color's lightness and eliminate the gray area where WCAG2 and APCA conflict on black/white foregrounds.
Yes, it's CSS. And yes, it's blazingly fast.
Usage:
background: oklch(from <color> var(--_ak-safe-l) c h);