cideM / yui

A minimal Vim/Neovim color scheme inspired by Dieter Rams
MIT License
135 stars 6 forks source link

Generate light colors and improve contrast report #46

Closed cideM closed 1 year ago

cideM commented 1 year ago

With all the utility functions available in the code base I thought it would be useful to generate the light versions of the colors automatically by increasing the hsluv luminance value until a desired contrast ratio is reached. In this case I'm aiming a >7 or AAA as it's called in the W3C contrast checker. I also extracted the Report functionality. I didn't add it to "template/" since I'm not yet sure how generally useful it is outside of YUI. Not that anything here is really extracted into a shared library (no tests after all) but I'm at least trying to keep "template/" clear of anything specific to YUI.