if (isPaletteIndex(brush.color)) {
const pal = emu.handles.get<PaletteInfo>(dc.selectedPalette);
const [r, g, b] = resolveColor(brush.color, pal);
dc.ctx.fillStyle = `rgb(${r},${g},${b})`;
}
else
dc.ctx.fillStyle = colorToCSS(brush.color);
dc.ctx.fillRect(left, top, right - left, bottom - top);
}