Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl std::iter::DoubleEndedIterator for palette::gradient::Take #153

jansegre opened this issue Nov 26, 2019 · 1 comment · Fixed by #154

impl std::iter::DoubleEndedIterator for palette::gradient::Take #153

jansegre opened this issue Nov 26, 2019 · 1 comment · Fixed by #154


Copy link

Would allow doing gradient.take(n).rev() without collecting. My main reasoning for that is basically because for lower values of n (1 or 2), gradient.take(n) is a bit skewed to the first colors of the gradient.

Copy link

Ogeon commented Nov 26, 2019

Makes sense to me. I see no reason why it wouldn't be double ended.

As for the skewing, I suspect there may have been a mistake when it was implemented and that the last stop is not at the very end of the gradient. That should be fixed.

bors bot added a commit that referenced this issue Nov 26, 2019
154: Add DoubleEndedIterator impl for gradient::Take r=Ogeon a=jansegre

`gradient.take(n).rev()` is now possible, closes #153

Co-authored-by: Jan Segre <>
@bors bors bot closed this as completed in 902150c Nov 26, 2019
@bors bors bot closed this as completed in #154 Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging a pull request may close this issue.

2 participants