Skip to content

Commit

Permalink
Update colour contrast formula with new constant from WCAG 2.2 (#37731)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhlauke committed Dec 27, 2022
1 parent 39c51aa commit eb48194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scss/_functions.scss
Expand Up @@ -188,7 +188,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
);

@each $name, $value in $rgb {
$value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
$value: if(divide($value, 255) < .04045, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
$rgb: map-merge($rgb, ($name: $value));
}

Expand Down

0 comments on commit eb48194

Please sign in to comment.