|
|
@ -47,9 +47,7 @@ const themes = [ |
|
|
|
// should not be used to look up 0-15 (will return transparent)
|
|
|
|
// should not be used to look up 0-15 (will return transparent)
|
|
|
|
const colorTable256 = new Array(16).fill('rgba(0, 0, 0, 0)') |
|
|
|
const colorTable256 = new Array(16).fill('rgba(0, 0, 0, 0)') |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// fill color table
|
|
|
|
// fill color table
|
|
|
|
|
|
|
|
|
|
|
|
// colors 16-231 are a 6x6x6 color cube
|
|
|
|
// colors 16-231 are a 6x6x6 color cube
|
|
|
|
for (let red = 0; red < 6; red++) { |
|
|
|
for (let red = 0; red < 6; red++) { |
|
|
|
for (let green = 0; green < 6; green++) { |
|
|
|
for (let green = 0; green < 6; green++) { |
|
|
@ -61,13 +59,11 @@ const colorTable256 = new Array(16).fill('rgba(0, 0, 0, 0)') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// colors 232-255 are a grayscale ramp, sans black and white
|
|
|
|
// colors 232-255 are a grayscale ramp, sans black and white
|
|
|
|
for (let gray = 0; gray < 24; gray++) { |
|
|
|
for (let gray = 0; gray < 24; gray++) { |
|
|
|
let value = gray * 10 + 8 |
|
|
|
let value = gray * 10 + 8 |
|
|
|
colorTable256.push(`rgb(${value}, ${value}, ${value})`) |
|
|
|
colorTable256.push(`rgb(${value}, ${value}, ${value})`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TermScreen { |
|
|
|
class TermScreen { |
|
|
|
constructor () { |
|
|
|
constructor () { |
|
|
|