loony-bean / textplots-rs

Terminal plotting library for Rust
238 stars 24 forks source link

feat: Add the ability to plot in color #31

Closed BroderickCarlin closed 3 years ago

BroderickCarlin commented 3 years ago

This PR adds a new trait ColorPlot with a method linecolorplot() that can be used to add a shape to a canvas with a specified color. Currently color is defined by drawille::PixelColor which provides a set of sane default colors as well as the ability to specify RGB values.

This is a non-breaking change. An example project has also been added to illustrate adding 2 different shapes to a canvas with 2 different colors.

Refs: #10