Mischback / colorizer

A simple web-based colorscheme builder which focuses on contrast values.
https://mischback.github.io/colorizer/
MIT License
1 stars 0 forks source link

Fix calculation of relative luminance #9

Closed Mischback closed 1 year ago

Mischback commented 1 year ago

The engine uses a function to determine the relative luminance of a given color. There is a bug!

The implementation is most-likely based on a SO answer, but there's a wrong threshold in the function. See https://www.w3.org/WAI/WCAG20/errata/ for more details.

Fix

Just change 0.03928 to 0.04045.