- From: Isaac Muse via GitHub <noreply@w3.org>
- Date: Wed, 25 Mar 2026 04:22:32 +0000
- To: public-css-archive@w3.org
@jparnzen Yep, I think the sign is backwards. As to why it is needed? Basically, when the value gets too small, you are just dealing with floating-point noise. When you divide by these small values later, you get very, very big values that cause things to break. Basically, it's needed for numerical stability. This is a normal issue that can occur in algorithms sometimes that need to avoid zero, as we do in this algorithm. Depending on what you do after, sometimes the algorithm can tolerate it such values, but in this case, it cannot. > There is a current_OkLCh that looks to be defined locally to the loop in the logic, but origin_rgb gets based on it. So should current still be origin_rgb? I'll have to take a closer look tomorrow, but it's likely that if it doesn't match the reference implementation in Color.js, it probably needs updating. Color.js _should_ follow the algorithm pretty close, except for one step to sanely handle some HDR cases, as it handles more than what is defined in the CSS level 4 spec. -- GitHub Notification of comment by facelessuser Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10579#issuecomment-4123202808 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 25 March 2026 04:22:32 UTC