Open masakudamatsu opened 10 months ago
On May 2021, the formula to calculate relative luminance was updated:
Before May 2021 the value of 0.04045 in the definition was different (0.03928). It was taken from an older version of the specification and has been updated. It has no practical effect on the calculations in the context of these guidelines. — https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html#dfn-relative-luminance
However, the code for calculating relative luminance uses 0.03928.
Replace 0.03928 with 0.04045 in line 18 of src/utils/getContrastRatio.js
Problem
On May 2021, the formula to calculate relative luminance was updated:
However, the code for calculating relative luminance uses 0.03928.
Solution
Replace 0.03928 with 0.04045 in line 18 of src/utils/getContrastRatio.js