Edit an indexed PNG palette

Every pixel is remapped locally — this page has no server to send to.

When the file carries a real PLTE table, change the colour definition and keep every compressed pixel index exactly where it was.

198°
One frame, one selection. The paint moves 170 degrees around the hue wheel at the lightness it already had; the brick, the tarmac and the jacket are the same pixels either side of the line.
Drop an image here, or browse for oneJPG, PNG, WebP, GIF, BMP, TIFF and ICO decode here. HEIC pulls a codec the first time one arrives.

Nothing to hand?

A different operation from recolouring pixels

An indexed PNG does not store red, green and blue at every position. It stores a small integer and a PLTE table that says which colour each integer means. Changing one table entry recolours every pixel carrying that index without rendering the image into a new grid.

The workbench probes the file header and reports the entry count. When palette output is available, the exported file copies the compressed pixel data and replaces only the selected RGB triplet in PLTE, then recomputes that chunk's CRC.

Boundaries of the shortcut

  1. It applies only to colour-type-3 indexed PNG, not to true-colour PNG, JPEG, WebP or a file merely named .png.
  2. One visible object can use several entries for antialiasing and shading, so changing a single swatch may leave a fringe.
  3. Two objects sharing the same entry cannot be separated without changing pixel indices, which this lossless path deliberately refuses to do.

Questions about palette bytes

Which PNG files have an editable palette?
Indexed PNGs use colour type 3 and a PLTE chunk. Ordinary true-colour PNGs store RGB values per pixel and use the normal rendered recolour path instead.
Why is palette export lossless?
The pixel stream contains indices into the table. Rewriting one table entry changes what those indices display without decoding, resampling or recompressing the IDAT pixel data.
Can one palette entry represent several visible colours?
It represents exactly one stored RGB triplet, but antialiased artwork often uses several nearby entries around an edge. Those must be changed separately if all belong to the intended region.

Related colour workflows