ogham / rust-ansi-term

Rust library for ANSI terminal colours and styles (bold, underline)
https://crates.io/crates/ansi_term
MIT License
457 stars 77 forks source link

Add a helper to switch colors to their `intense` variant #66

Open yaahc opened 4 years ago

yaahc commented 4 years ago

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.

cjbottaro commented 3 years ago

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.

meain commented 2 years ago

@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.

jwalton commented 9 months ago

If you really want consistent bright colors, you can use 256 colors with the Color::Fixed.

Using the 256 color pallete has some disadvantages:

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. :(