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

Add support for un-equal segments #7

Closed
ddanny opened this issue Dec 16, 2013 · 1 comment
Closed

Add support for un-equal segments #7

ddanny opened this issue Dec 16, 2013 · 1 comment

Comments

@ddanny
Copy link

ddanny commented Dec 16, 2013

The rainbow colors are equally distributed across the interval. Supporting segments that are not equal would be great.

@anomal
Copy link
Owner

anomal commented Dec 17, 2013

You can use setSpectrum to distribute colours unequally by repeating the same colour. For example, if you would like a gradient from red to black, but you want more black than red, you can use:

rainbow.setSpectrum('red', 'black', 'black');

@anomal anomal closed this as completed Apr 20, 2014
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

No branches or pull requests

2 participants