We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking at color.js, I see the following function:
luminosity: function () { // http://www.w3.org/TR/WCAG20/#relativeluminancedef var rgb = this.rgb().color; var lum = []; for (var i = 0; i < rgb.length; i++) { var chan = rgb[i] / 255; lum[i] = (chan <= 0.04045) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); } return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; },
Focusing on (chan <= 0.04045), I looked at http://www.w3.org/TR/WCAG20/#relativeluminancedef and saw if RsRGB <= 0.03928 then R = RsRGB/12.92 else R = ((RsRGB+0.055)/1.055) ^ 2.4
(chan <= 0.04045)
if RsRGB <= 0.03928 then R = RsRGB/12.92 else R = ((RsRGB+0.055)/1.055) ^ 2.4
Shouldn't 0.04045 be 0.03928? Or, what is the reason for the discrepancy? I have not understood something?
The text was updated successfully, but these errors were encountered:
The link is outdated, it should refer to WCAG 2.1. The value as been adjusted in WCAG 2.1: https://www.w3.org/TR/WCAG21/#dfn-relative-luminance
Sorry, something went wrong.
No branches or pull requests
Looking at color.js, I see the following function:
Focusing on
(chan <= 0.04045)
, I looked at http://www.w3.org/TR/WCAG20/#relativeluminancedef and sawif RsRGB <= 0.03928 then R = RsRGB/12.92 else R = ((RsRGB+0.055)/1.055) ^ 2.4
Shouldn't 0.04045 be 0.03928? Or, what is the reason for the discrepancy? I have not understood something?
The text was updated successfully, but these errors were encountered: