Palette tools?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Palette tools?
by on (#104746)
Hi!

Are there any tools available that would let me reorder the colors of an image's palette without affecting the image itself?

Contrived simplified example: changing the palette of an image from [blue][red][green][yellow] to [yellow][green][red][blue] and still keep the image looking the same.

For extra difficulty, I have two images that have very similar colors but their palettes are in a different order. Are there any tools available that can help unifying them easier than fixing it by hand?

Thanks!
DJCC
Re: Palette tools?
by on (#104747)
If your graphics are already in tiled format, YY-CHR can do this very well.

Otherwise I don't know.
Re: Palette tools?
by on (#104748)
Bregalad wrote:
If your graphics are already in tiled format


In tiled format? I'm not sure what that means.

Doesn't YY-CHR work with the data inside roms?

In my case, I'm working with bitmaps that get converted to binary when my game gets built.
Re: Palette tools?
by on (#104750)
YY-chr can work on .bin files you include in your ROM easy too. As for making palettes, I just hex editor them myself.
Re: Palette tools?
by on (#104751)
Grafx2 will let you reorganize palettes if I remember correctly. (If I'm not remembering correctly, let me know. I'm sure I know of a program that will do this.)

Edit: Yes, Grafx2 will do it. Click the L. Select your image. Click PAL. Click next to the one of the colors you want to swap the order of. Click X-Swap. Click the color you want to swap its position with. Click okay. Save.

Edit2: As a matter of fact, your example would be even easier. Click and drag to select the colors you want to reverse the order of. Then click X-invert. It will make the lowest index number selected the highest, the highest the lowest etc. without changing the image.

For part two, (unifying palettes) ASEPRITE may do that if I'm understanding correctly.

Open the indexed image whose palette you want the other image to use with ASEPRITE.

Open the second image with ASEPRITE. Go to sprite, color mode, RGB color. Then copy it.

Paste into the first image's tab. ASEPRITE will try to match the RGB image's pixels to the nearest colors available in the palette. (But it may not give you the result you want, depending on how close the colors are. You may get two colors that end up with the same index after pasting for instance. In which case, do it by hand.)

(If that doesn't work, open the second image you want to unify with some other program that will copy it to the copy buffer as RGB rather than indexed.)

Save as a new filename.
Re: Palette tools?
by on (#104753)
Photoimpact lets you re-order the palette without changing the image, but you must save as a BMP file afterwards, otherwise it will automatically re-order the palette again.
Re: Palette tools?
by on (#104756)
The gimp provides this interface: http://docs.gimp.org/2.6/en/plug-in-colormap-remap.html
Re: Palette tools?
by on (#104758)
Or in GIMP:
  1. Create a new RGB image of the same size.
  2. Fill it with the first color in the desired palette.
  3. Image > Mode > Indexed and accept the defaults.
  4. Open the colormap: Windows > Dockable Dialogs > Colormap.
  5. For each color in order, choose the color in the color picker, then add it to the new image's colormap.
  6. Paste something into this window.
Re: Palette tools?
by on (#104768)
Kasumi wrote:
For part two, (unifying palettes) ASEPRITE may do that if I'm understanding correctly.

Open the indexed image whose palette you want the other image to use with ASEPRITE.

Open the second image with ASEPRITE. Go to sprite, color mode, RGB color. Then copy it.

Paste into the first image's tab. ASEPRITE will try to match the RGB image's pixels to the nearest colors available in the palette. (But it may not give you the result you want, depending on how close the colors are. You may get two colors that end up with the same index after pasting for instance. In which case, do it by hand.)

(If that doesn't work, open the second image you want to unify with some other program that will copy it to the copy buffer as RGB rather than indexed.)

Save as a new filename.


I realized I could do this with Graphics Gale, which is what I use. Thanks for the idea!
Re: Palette tools?
by on (#104778)
Kasumi wrote:
Grafx2 will let you reorganize palettes if I remember correctly. (If I'm not remembering correctly, let me know. I'm sure I know of a program that will do this.)

Thanks, didn't know about this tool.

I'll just add that reorganizing the palette in Photoshop is absolutely painful.