3 ms·
I had this issue [1] where a piece of software (GNU octave) would adapt foreground text color to my (dark) theme, while the background would not, thus ending up
by MayeulC 8y ago
I had this issue [1] where a piece of software (GNU octave) would adapt foreground text color to my (dark) theme, while the background would not, thus ending up unreadable. The issue was exacerbated by the fact that colors could be picked by the user.
I would have liked a simple way to automatically adjust the colors. Are the formulas behind the site available somewhere? That would make a nice utility function for Octave as well :)
[1]: https://savannah.gnu.org/bugs/?func=detailitem&item_id=53995 https://savannah.gnu.org/bugs/?func=detailitem&item_id=53995
- zamadatix 8y ago"(L1 + 0.05) / (L2 + 0.05), where - L1 is the relative luminance of the lighter of the colors, and - L2 is the relative luminance of the darker of the colors." https://www.w3.org/TR/WCAG20/#contrast-ratiodef https://www.w3.org/TR/WCAG20/#contrast-ratiodef