Restrict correction algorithm to produce sane results in extreme cases #436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using ray trace and the adaptive lightness approach, Luv and its cylindrical counter part can produce chroma reduction curves that stress the algorithm in the dark blue region. This can yield yellows which make no sense.
Add a restriction in the correction code that projects the color onto the chroma reduction vector in the Lab model to restrict extreme results, outside the range of the vector, which can create colors outside the color space's ability to convert the color causing massive hue shifts.
Colors will still not be accurate, but they will be much closer to then intended target and be a more sane representation.