-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle corner cases more appropriately.
(1) Color channels which may fall outside the valid ranges due rounding errors caused by floating point arithmetics are now clamped into their respective ranges. Fixes #8. (2) Make rgb2hpluv() return integer indicating whether the result falls into the valid HPLuv color space or not. Also improve documentation of the function to make clear the returned saturation is outside the expected range for RGB triplets not representable in HPLuv. Fixes #6.
- Loading branch information
Showing
2 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters