loader: accept "yellow" as a named color

For historical reasons console color number 3 may be either yellow (most
consoles) or brown (VGA palette).  The console escape code standard
uses "yellow", but teken color name constants appear to be based on the
VGA scheme and use TC_BROWN for color 3.  Even so, the palette table
used 50,50,0 as the RGB percentage tuple, resulting in a dim yellow for
framebuffer consoles at the time teken was introduced.

Amusingly, in 19e2ce2d83 the comment on the palette entry was changed
from "brown" to "dark yellow" but the colour itself was changed from
a pure yellow to being somewhat brown.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2022-03-11 14:27:46 -05:00
parent 6bb7ba4aa1
commit e9249ef958
2 changed files with 2 additions and 2 deletions

View File

@ -457,7 +457,7 @@ color_name_to_teken(const char *name, int *val)
*val = TC_GREEN | light;
return (true);
}
if (strcasecmp(name, "brown") == 0) {
if (strcasecmp(name, "yellow") == 0 || strcasecmp(name, "brown") == 0) {
*val = TC_BROWN | light;
return (true);
}

View File

@ -544,7 +544,7 @@ color_name_to_teken(const char *name, int *val)
*val = TC_GREEN | light;
return (true);
}
if (strcasecmp(name, "brown") == 0) {
if (strcasecmp(name, "yellow") == 0 || strcasecmp(name, "brown") == 0) {
*val = TC_BROWN | light;
return (true);
}