-
Notifications
You must be signed in to change notification settings - Fork 247
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
[FEATURE] gradient colors #782
Comments
Hi, and thanks for the report! Being able to use gradients sounds very fun indeed! I haven't spent much time thinking about it though so I'm not sure yet what the API would look like - in particular:
|
The latest couple of commits bring some gradient features:
A few places make use of these:
Finally, a |
thanks! Is there anything yet to add, or can we close the issue? |
Well, it depends if your use-case was solved :) There's an endless list of potential improvements: support for more 2D gradients (diamond, conical, ...), composite 2D gradients, LCH/HSB/HSL color space interpolation, more gradient presets, user-expandable list of presets that can be loaded by the |
Is your feature request related to a problem? Please describe.
only a static color for a foreground/background is allowed right now, which limits creativity
Describe the solution you'd like
being able to set the foreground/background color, to a horizontal/vertical/diagonal gradient.
ideally, we would have a Gradient trait with a
fn get_color(pos: XY, size: XY) -> Color
that would allow users to make their own gradients which would fit their needsDescribe alternatives you've considered
if having gradients isnt very important you can just use a static color, if you need them the only option is using the Canvas or writing your own View
Additional context
was already mentioned here, seems like theres no progress on it tho
i could write the code for this, but im not sure what the api should look like
heres a gist with a proof-of-concept
The text was updated successfully, but these errors were encountered: