colored icon indicating copy to clipboard operation
colored copied to clipboard

Gradients and Rainbows

Open B-Teague opened this issue 2 years ago • 1 comments

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.

B-Teague avatar Jul 30 '23 18:07 B-Teague

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.

kurtlawrence avatar Dec 10 '23 02:12 kurtlawrence