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.
Summary: Fixed a typo causing incorrect simulation of tritanopic color vision deficiencies. Also added tests for this corrected behavior.
This is my first pull request, I apologize if I have done anything incorrectly. I have been working with simulating various color vision deficiencies, and I noticed that the simulation for tritanopia was not producing results that I expected. Looking into the code in the function
tritanopic
had a typo:Colors.jl/src/algorithms.jl
Line 138 in b550b7b
It should be:
This error can be easily observed when inspecting the behavior of the function at p=0 (no photopigment loss):
This can also be seen in the RGB values:
As a counterexample, the function
protanopic
is working correctly:This pull request fixes this typo, and adds three tests to validate this correct behavior. Please let me know if there are any questions.