rust-ansi-term
rust-ansi-term copied to clipboard
Add a helper to switch colors to their `intense` variant
related to this issue in color-eyre
where it was reported that colors are particularly dark on Windows https://github.com/yaahc/color-eyre/issues/12
The color-backtrace
crate which color-eyre
depends on fixes this issue by using intense
variants of colors, according to termcolor
, which are the 8-15
colors instead of the standard 0-7
colors. I think it makes sense to add a helper function on Color
that will change a Color
to its intense version if applicable.
Is this related to how I can't get "bright" colors without using the bold()
function?
If so, yes please. I want the bright/intense colors without setting the font to bold.
@cjbottaro Just FYI, you get bright colors when using the bold function only because some terminals have "Use bright colors for bold text" enabled which might not always be the case. If you really want consistent bright colors, you can use 256 colors with the Color::Fixed
.
If you really want consistent bright colors, you can use 256 colors with the Color::Fixed.
Using the 256 color pallete has some disadvantages:
- If the user has changed the colors in their terminal, using the 256 color pallette won't respect their color settings.
- It seems unlikely there are too many terminal emulators that don't support 256 color escape codes, but it's a possibility.
nu-ansi-term supports Color::LightRed
to get a bright red using the standard 16-color pallette. I don't know of a way to do it in this crate though. :(