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

Gradient colors #2

Closed
nubbel opened this issue Jun 15, 2015 · 4 comments
Closed

Gradient colors #2

nubbel opened this issue Jun 15, 2015 · 4 comments

Comments

@nubbel
Copy link

nubbel commented Jun 15, 2015

It would be nice to have a method that generates color on a gradient between two colors.
API might look like that:

red.gradientTo(green).colorAt(0.5) // yellow-ish
@yannickl
Copy link
Owner

I wonder if this feature should be available in this library or if an another library could not be more relevant?

I need to study the issue (if another people want participate it could be nice).

Moreover I don't think the fluent API is necessary in this case, I prefer something like that:

red.gradientTo(green, at: 0.5)

@SuperWomble
Copy link

My two cents: gradients are a drawing operation, not a color operation as such. I think gradients are best handled in other libraries entirely. IMO, this (excellent) project should just focus on color.

@nubbel
Copy link
Author

nubbel commented Aug 16, 2016

This issue is not about drawing gradients (we have CAGradientLayer for that), but about picking a color that lies on a point of a gradient from one color to another which has nothing to do with a drawing operation IMHO.

@yannickl
Copy link
Owner

Indeed I don't think that "drawing" gradients is pertinent for the library. But building a gradient color array and / or picking a color from it can be useful.

For the next version of the library I've started to work work on but it needs to be involved and refined the API design.

yannickl added a commit that referenced this issue Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants