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

Support 256 ANSI colour set #870

Closed
kirawi opened this issue Oct 17, 2021 · 4 comments
Closed

Support 256 ANSI colour set #870

kirawi opened this issue Oct 17, 2021 · 4 comments
Labels
A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@kirawi
Copy link
Member

kirawi commented Oct 17, 2021

https://docs.rs/crossterm/0.21.0/crossterm/style/enum.Color.html#variant.AnsiValue
Like we have for the base 16 colours:

#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Color {
Reset,
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
Gray,
LightRed,
LightGreen,
LightYellow,
LightBlue,
LightMagenta,
LightCyan,
LightGray,
White,
Rgb(u8, u8, u8),
Indexed(u8),
}

@kirawi kirawi added C-enhancement Category: Improvements A-theme Area: Theme and appearence related E-good-first-issue Call for participation: Issues suitable for new contributors labels Oct 17, 2021
@kirawi
Copy link
Member Author

kirawi commented Oct 17, 2021

Wait, never mind it's already there.

@kirawi kirawi closed this as completed Oct 17, 2021
@chtenb
Copy link
Contributor

chtenb commented Aug 22, 2023

Is this feature actually documented anywhere? I'm trying to figure out how to use the 256 colors in a theme, and almost created an issue for it when I stumbled upon this thread.

@the-mikedavis
Copy link
Member

Parsing for this was added in #5119 (after the 22.05 release, so you will need to run on master). It looks like there aren't any docs for it yet.

@chtenb
Copy link
Contributor

chtenb commented Aug 22, 2023

I see, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theme Area: Theme and appearence related C-enhancement Category: Improvements E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants