Skip to content

Conversation

@vokimon
Copy link

@vokimon vokimon commented Nov 26, 2019

This PR addresses issue #47 which was also addressed by PR #48: Given that hue is a circular magnitude, color transitions should be able to take the shorter path when it requires crossing the 1 to 0 hue loop.

Unlike PR #48 this implementation, has added enough tests cases to have full branch coverage. Also the implementation is simpler and improves original code performance (2x in my box). By providing a longer=True option, it also preserves a way to obtain the former longer hue path (rainbow like scales) that the former implementation produced just in some cases. Now the longer path can be generated for any starting and ending points, not just between a purpleish and a yellowish red.

Hope it helps, regards!

@codecov
Copy link

codecov bot commented Nov 26, 2019

Codecov Report

Merging #50 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage   99.13%   99.14%   +<.01%     
==========================================
  Files           1        1              
  Lines         232      233       +1     
==========================================
+ Hits          230      231       +1     
  Misses          2        2
Impacted Files Coverage Δ
colour.py 99.14% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11f138e...b21980c. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant