Skip to content

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