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

Converting between u8 and XtermColors #42

Closed
LordMZTE opened this issue Dec 23, 2021 · 1 comment · Fixed by #44
Closed

Converting between u8 and XtermColors #42

LordMZTE opened this issue Dec 23, 2021 · 1 comment · Fixed by #44
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@LordMZTE
Copy link
Contributor

Something that at the moment is very annoying to do with owo-colors is coloring a string when given a Xterm color code in the form of a u8, as the only ways to convert between a u8 and a XtermColors struct are to use unsound code to transmute it (the enum isn't #[repr(u8)]) or a 255 line long match expression. It would be great if conversion functionality was added.

@jam1garner
Copy link
Owner

@LordMZTE pushed in owo_colors v3.2.0, which is now on crates.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants