Is there any way to move colors within the index color table? For example if pure black is index 0, and I want to move it to index 255, is there any way to do it, without re-assigning every color? Right now I have to use the magic wand (with tolerance set to 0 - non contiguous) to select every pixel of a certain index color, then I use paint bucket to fill them all with the new index color. It's a very tedious process. It would be so much easier if I could just re-assign colors within the index color table itself.

3 Answers 3


You can directly alter the color table.

Image > Mode > Color Table

Click any color and the picker will appear. Assign a new color.

You can also alter groups of colors. Click-drag across a range of colors in the Color table. Let go and the picker appears once for the first color, then again for the last color. This will create a blend or gradient between the two colors in the Color Table.

enter image description here

I don't know for certain if this would be easier for you. But I can imagine it's much better than selecting pixels.

  • Thanks for the reply, but that's not exactly what I'm trying to do. All that does is change the color in each index... what I'm trying to do is take the colors in certain positions and MOVE them to another position. Like this... (I made a gif illustrating what I want the end result to be.i.imgur.com/7nOevIn.gifv
    – TomkatDF2
    Commented Jan 25, 2020 at 22:46
  • That doesn't make much sense. The color table, while represented by little squares, starts at the first color and ends at the last color. You can't insert a bunch of empty references before the first color.
    – Scott
    Commented Feb 24, 2020 at 9:53
  • One reason why this might be desirable is if certain programs use the color at a particular color index for something special (eg. the Half-Life 1 engine uses index 255 as a transparency key). Commented Sep 12, 2020 at 2:44

I am not sure if this will work because I do not currently have a Ps installed on this computer.

  1. Prepare a custom palette with the order you need the color table to be. Black on place 1 on this case. Save the palette.

  2. Take your indexed file and change the color mode to RGB.

  3. Convert to index mode but using the palette you already prepared. Do not use any dithering.

This needs more details, for example where you save the palette, but I can not provide them for now.


This is roundabout but works!

  1. Image -> Mode -> RGB Color (This wipes the Index table to be recreated when switching back)
  2. Image -> Mode -> Indexed Color... (Asks you to create/assign an index table)
  3. [Indexed Color Dialog Box] Palette: Exact, Forced: Custom (Click this it pops up a window that allows you to select colors to forcibly assign an index to. Any color not forced will auto populate like usual.), Transparency: Unchecked
  4. Click Ok

There you go you now have your colors indexed to your desire.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.