-
Notifications
You must be signed in to change notification settings - Fork 758
Description
The sample pseudocode for gamut mapping is confusing, particularly in step 18 (the "while" loop). There are cases where the pseudocode doesn't say whether the loop should continue looping, but it's not clear whether that means it should terminate or implicitly continue (since 18 says "repeat the following steps"). This is made more confusing by the fact that sometimes the pseudocode does explicitly say to continue.
For example, if at step 18.3 min_inGamut is false and inGamut(current) is true, neither condition in 18.3 nor 18.4 will match, and there's no explicit indication what should happen. I tried checking the Color.js implementation as a reference, but it seems that it runs step 4 incorrectly in this case. What is the correct behavior here?