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

feat: impl From<(r, g, b)> to CustomColor #153

Merged

Conversation

caojen
Copy link
Contributor

@caojen caojen commented Oct 24, 2023

Hi, this pull request implements From<(u8, u8, u8)> for CustomColor.

By this, we have one more way to create a ColoredString when using RGB:

"Hello".true_color(0, 255, 255);
"Hello".custom_color(CustomColor { 0, 255, 255 });

// new:
"Hello".custom_color((0, 255, 255)); 

.gitignore Outdated Show resolved Hide resolved
@kurtlawrence kurtlawrence added the bump-minor New non-breaking features label Dec 10, 2023
@caojen
Copy link
Contributor Author

caojen commented Dec 10, 2023

@kurtlawrence Ok.

@kurtlawrence
Copy link
Collaborator

PR approved, I'll merge in once the CI runs through.

@kurtlawrence kurtlawrence merged commit c5f7e00 into colored-rs:master Dec 11, 2023
10 of 14 checks passed
@caojen caojen deleted the feature/impl-from-tuple-for-custom-color branch December 11, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-minor New non-breaking features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants