console-rs / console

A rust console and terminal abstraction
MIT License
953 stars 113 forks source link

white isn't white #177

Open ToBinio opened 1 year ago

ToBinio commented 1 year ago

When using the color white it isn't really white instead it's more a light gray. here is a table of the 256 colors.

currently, only the first 8 (0-7) are used and white is mapped to 7 which isn't white

it would probably be good to add the first 16 colors to the color enum.

note: if you are ok with this change I could do the change myself and open a PR

joshka commented 10 months ago

White is the name of from ECMA-48 SGR 37, so in theory the name is correct.

In many terminal color schemes this this is rendered as a light grey color (and some libraries refer to this specifically as Grey for this reason).

In practice, the color you want is Bright White (.bright().white().

I'm not a maintainer here, but a maintainer of the Ratatui crate (which uses Grey because of historical reasons). I think adding the bright colors to the enum would likely be a good idea, but renaming the color would be bad as it perpetuates more wrongly named colors even though they are more perceptually correct.