Skip to content

[FEATURE] gradient colors #782

@ghost

Description

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 needs

Describe 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions