fix: set_palette_color too slow when changed color affects more than a few pixels.
fix: Pencil overflows pixels when used over canvas borders.