Closed williamjsdavis closed 1 year ago
Base: 94.33% // Head: 95.51% // Increases project coverage by +1.18%
:tada:
Coverage data is based on head (
d117720
) compared to base (b550b7b
). Patch has no changes to coverable lines.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
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:https://github.com/JuliaGraphics/Colors.jl/blob/b550b7bc2f6f27fdf61c30b3215b28df826ceebf/src/algorithms.jl#L138
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.