How to switch image mode to indexed without changing main colors?

I often want to switch to indexed mode to reduce filesize.

It’s often logos etc where some exact colors are critical.

The original image from designer usually contains large areas of a solid specific color, but after indexing that color has changed slightly.

My current process is:

  • Find my main 2 or 3 colors I don’t want changed, copy their color values.
  • Switch mode to indexed (to about 64 colors to account for text edges needing to blend into background etc)
  • Go to the Colormap dialog and find what those main colors are now
  • Right click on that color and paste in the original value
  • Now I have an 64 color image with the main colors still the same as original

However this process is rather tedious, especially because in the colormap dialog it’s difficult for me to find the main colors.

I right click on a color and choose “Select this color”. If it selects the large chunk of logo I’m interested in, then I know it’s the right color to edit. Often the color is very close but just selects a little edge of text, so then I know it’s not the “main” color.

I would love an easier/faster way to achieve my goal.

Perhaps there’s some way to lock a color before indexing? I could select my main colors and lock them, like saying “don’t change these”… then index

Create a palette that includes these colors (plus a reasonable set that covers the rest) and specify that palette when indexing using the image option.

1 Like

Do you really need to index your image => loosing plenty information?

I got a good 60% file reduction just by activating the:
X Save this XCF file with better but slower compression
when saving, WITHOUT indexation = no lost information

From 1.3 Mb to 520 Kb…

1 Like