Closed airstrike closed 4 years ago
Good catch, thanks for creating this issue!
I think the change would have to go somewhere in here: https://github.com/timofurrer/colorful/blob/9f95d3eaa6b57b55639c623e55065f8a37eee8e7/colorful/core.py#L103
Basically ANSI_16_COLORS
should allow the bright colors in addition to the standard colors when using ANSI_8_COLORS
.
I'm not entirely sure yet what the best implementation would look like - because here
https://github.com/timofurrer/colorful/blob/9f95d3eaa6b57b55639c623e55065f8a37eee8e7/colorful/core.py#L43
the colorname is already evaluated and something like bright_red would not be found (it's not a valid X11 color, and it depends on the used color palette anyway.)
Maybe we need some kind of logic in
https://github.com/timofurrer/colorful/blob/9f95d3eaa6b57b55639c623e55065f8a37eee8e7/colorful/core.py#L43
to determine whether the given RGB should be bright in case of the ANSI_16_COLORS
mode ...
Any ideas?
This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
Haven't yet had time to think this through / work on it, but commenting on it so the issue isn't closed just yet.
This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
https://github.com/timofurrer/colorful/search?q=rgb_to_ansi16&unscoped_q=rgb_to_ansi16
Though
rgb_to_ansi16
includes ause_bright
parameter, the user has no way of passing a True value to the function