The first 16 colors (0-15) of ANSI 256 are the same colors as ANSI 16 colors. This PR fixes it so convert.ansi256.rgb returns sensible values for these lower colors. Prior to this change:
console.log(convert.ansi256.rgb(0)); // Prints [-51, -153, -204]
Negative r, g, b values are clearly nonsense. After this change:
console.log(convert.ansi256.rgb(0)); // Prints [0, 0, 0]
The first 16 colors (0-15) of ANSI 256 are the same colors as ANSI 16 colors. This PR fixes it so convert.ansi256.rgb returns sensible values for these lower colors. Prior to this change:
Negative
r, g, b
values are clearly nonsense. After this change: