Skip to content

color_scale uses by default the shorter path considering the hue cycle, long path as an option#50

Open
vokimon wants to merge 2 commits into
vaab:masterfrom
vokimon:long-and-short-hue-scale-paths
Open

color_scale uses by default the shorter path considering the hue cycle, long path as an option#50
vokimon wants to merge 2 commits into
vaab:masterfrom
vokimon:long-and-short-hue-scale-paths

Conversation

@vokimon

@vokimon vokimon commented Nov 26, 2019

Copy link
Copy Markdown

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

codecov Bot commented Nov 26, 2019

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@11f138e). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #50   +/-   ##
=========================================
  Coverage          ?   99.14%           
=========================================
  Files             ?        1           
  Lines             ?      233           
  Branches          ?        0           
=========================================
  Hits              ?      231           
  Misses            ?        2           
  Partials          ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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