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

Gradients and Rainbows #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

B-Teague
Copy link

@B-Teague B-Teague commented Jul 30, 2023

Added support for two, three, or more colored gradients.
Added support for rainbows.

See example output

cargo run --example colored_lists

This is mainly a first draft. Let me know if there are additional changes you want me to add, and I'll be happy to make them.

@kurtlawrence
Copy link
Collaborator

I really like the effects!

I does have some downsides with the number of allocations being done.
Potentially there needs to be a different structure rather than Vec<ColoredString>, such as storing vectors of fg and bg colours which can be enumerated with the characters in ColoredString.
This way it would also somewhat abstract from the implementation of ColoredString which is likely to change in v3.

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

Successfully merging this pull request may close these issues.

2 participants