-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Closed Accepted as Obvious BugfixCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.css-color-4Current WorkCurrent Work
Description
In implementing the Gamut Mapping Algorithm in Color.js, I found a few areas where clarification in the pseudocode could be helpful. If any of these are too pedantic for pseudocode, feel free to ignore.
- In step 1, replace
return |origin|withconvert |origin| to |destination| and return it as the gamut mapped color. The explicit conversion is the important bit, the "as the gamut mapped color" is for parity with the other returns. - In step 10, defining
clip, should we change it to specify it clamps to the range of the color channel, instead of 0-1? This may be a moot point, as it appears that only unbounded spaces which don't go through this portion have channel ranges besides 0-1. - In steps 3 and 4, where we return white/black, should we specify white/black instead of 1's and 0's? Like # 2, this may be a moot point, as only unbounded spaces appear to have other channel values for white/black.
- Nit: In step 10, defining
clip, there's an extra pipe character at the end ofclip(color)|
Metadata
Metadata
Assignees
Labels
Closed Accepted as Obvious BugfixCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.css-color-4Current WorkCurrent Work