fromCSS-Tricks
18 hours agoApproximating contrast-color() With Other CSS Features | CSS-Tricks
There have been a few drafts of a specification function for this functionality, most recently, contrast-color() (formerly color-contrast()) in the CSS Color Module Level 5 draft. But with Safari and Firefox being the only browsers that have implemented it so far, the final version of this functionality is likely still a ways off. There has been a lot of functionality added to CSS in the meantime; enough that I wanted to see whether we could implement it in a cross-browser friendly way today. Here's what I have: color: oklch(from <your color> round(1.21 - L) 0 0);
Web development



















