2021年4月2日星期五

How can I calculate the opposite luminosity of a color in CSS?

I'm trying to programatically determine the inverse of a user-provided color in CSS in order to provide an aesthetically pleasing experience switching from light mode and dark mode in the browser.

Is this achievable? Perhaps it might take a dash of Javascript to modify a CSS variable?

https://stackoverflow.com/questions/66926827/how-can-i-calculate-the-opposite-luminosity-of-a-color-in-css April 03, 2021 at 08:57AM

没有评论:

发表评论