Use the rgb crate instead of own struct#174
Use the rgb crate instead of own struct#174RuboGubo wants to merge 9 commits intocolored-rs:masterfrom
Conversation
spenserblack
left a comment
There was a problem hiding this comment.
TBH I don't have a strong opinion one way or the other, but it could be nice to use a "standard" type instead of our own.
Looks like some tests need to be fixed before this can be merged.
|
Should add that this is a breaking change, so you should prob increment the major version of the crate, up to you though |
| //! format!("{:30}", "format works as expected. This will be padded".blue()); | ||
| //! format!("{:.3}", "and this will be green but truncated to 3 chars".green()); | ||
| //! | ||
| //! Custom colours are implemented using the `rgb` crate, which is re-exported for |
There was a problem hiding this comment.
Are we using UK English or American English in the rest of our docs? 😆
There was a problem hiding this comment.
well if UK English is an option....
|
Oh dear, I got mixed up and was thinking this PR was targeting a completely different project that I maintain. Sorry, my comments might not have all been applicable. Rather than remove an existing type, it might be better to implement |
|
I think migrating to Also the Rgb struct has a lot of extra helper functions that the |
|
For completeness I think you might be able to also implement Before you put in any more work, though, it might be good to wait and see what the other maintainers think about introducing the |
|
I think given that no-one has responded, I'll get the code cleaned up and passing, and then we can go from there |
This just makes sure that clippy doesn't complain about the impls for Custom Color struct
closes #173
It might be an idea to add a feature flag for this, but it's up to you, just shout if you want me to add it.