fix red/blue palette mixup

This commit is contained in:
Brooke Vibber 2022-11-26 08:07:57 -08:00
parent e20b8503ab
commit cb2898f6a6

View file

@ -28,9 +28,9 @@ class RGB {
}
static fromHex(val) {
let r = val & 0xff;
let g = (val >> 8) & 0xff;
let b = (val >> 16) & 0xff;
let r = (val >>> 16) & 0xff;
let g = (val >>> 8) & 0xff;
let b = val & 0xff;
return new RGB(r,g,b);
}
@ -618,7 +618,7 @@ async function convert(source, nbits) {
// Start with all colors usable with regular CTIA modes
// (not the 16-luminance special mode on GTIA)
let allColors = [];
for (let i = 0; i < 0xff; i += 2) {
for (let i = 0; i < 256; i += 2) {
allColors.push(i);
}