Open Richienb opened 3 years ago
Thanks - could you add tests that check the result of ansi256.ansi16()
to rgb.ansi16(ansi256.rgb())
to make sure it's as expected?
Something like:
for (let i = 0; i < 8; i++) {
assert( cc.ansi256.ansi16(i) === (i + 30) );
}
for (let i = 8; i < 16; i++) {
assert( cc.ansi256.ansi16(i) === (i + 90) );
}
for (let i = 16; i < 256; i++) {
assert( cc.ansi256.ansi16(i) === cc.rgb.ansi16(cc.ansi256.rgb(i)) );
}
Couldn't get the third test to work but the other 2 passed fine.
Output in Windows Terminal:
Fixes #92, Fixes #89