Skip to content
New issue

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

Fix srgb to linear #2372

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Fix srgb to linear #2372

merged 2 commits into from
Oct 2, 2024

Conversation

ntkme
Copy link
Contributor

@ntkme ntkme commented Oct 1, 2024

In the edge case of channel = 0.04045 the error is more than 1e⁻⁹, much higher than the required precision in Sass.

https://www.w3.org/TR/css-color-4/#color-conversion-code
https://github.com/color-js/color.js/blob/40e7a059c639bafde14504627e62791588c63100/src/spaces/srgb.js#L38

@ntkme
Copy link
Contributor Author

ntkme commented Oct 2, 2024

Why this PR matters in the edge case with exact value at cutoff point for the current implementation, and possible improvement: color-js/color.js#596

@nex3 nex3 merged commit 5535d1f into sass:main Oct 2, 2024
38 checks passed
@ntkme ntkme deleted the fix-srgb-to-linear branch October 2, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants