3-digit hexadecimal color defintions act like CSS (e.g., #FFF is #FFFFFF now, not #F0F0F0).

This commit is contained in:
William Kendrick 2006-09-11 08:25:24 +00:00
parent 114087af21
commit d30e67594e
4 changed files with 26 additions and 15 deletions

View file

@ -6528,9 +6528,12 @@ static void setup(int argc, char *argv[])
{
/* Nybble (#rgb) form */
color_hexes[NUM_COLORS][0] = (hex2dec(tmp_str[0]) << 4);;
color_hexes[NUM_COLORS][1] = (hex2dec(tmp_str[1]) << 4);;
color_hexes[NUM_COLORS][2] = (hex2dec(tmp_str[2]) << 4);;
color_hexes[NUM_COLORS][0] =
(hex2dec(tmp_str[0]) << 4) + hex2dec(tmp_str[0]);
color_hexes[NUM_COLORS][1] =
(hex2dec(tmp_str[1]) << 4) + hex2dec(tmp_str[1]);
color_hexes[NUM_COLORS][2] =
(hex2dec(tmp_str[2]) << 4) + hex2dec(tmp_str[2]);
color_names[NUM_COLORS] = strdup(str + count);
NUM_COLORS++;