diff --git a/color/command.c b/color/command.c index 43d868e6071..6629f3eee33 100644 --- a/color/command.c +++ b/color/command.c @@ -308,6 +308,11 @@ static enum CommandResult parse_color_name(const char *s, uint32_t *col, int *at /* If we are running in direct color mode, we must convert the xterm * color numbers 0-255 to an RGB value. */ *col = color_xterm256_to_24bit(*col); + /* FIXME: The color values 0 to 7 (both inclusive) are still occupied by + * the default terminal colours. As a workaround we round them up to + * #000008 which is the blackest black we can produce. */ + if (*col < 8) + *col = 8; } #endif color_debug(LL_DEBUG5, "colorNNN %d\n", *col); @@ -335,6 +340,12 @@ static enum CommandResult parse_color_name(const char *s, uint32_t *col, int *at mutt_buffer_printf(err, _("%s: color not supported by term"), s); return MUTT_CMD_ERROR; } + /* FIXME: The color values 0 to 7 (both inclusive) are still occupied by + * the default terminal colours. As a workaround we round them up to + * #000008 which is the blackest black we can produce. */ + if (*col < 8) + *col = 8; + color_debug(LL_DEBUG5, "#RRGGBB: %d\n", *col); return MUTT_CMD_SUCCESS; }