Managing color palette with multiple sprites
Printed From: Pixel Joint
Category: The Lounge
Forum Name: Resources and Support
Forum Discription: Help your fellow pixel artists out with links to good tutorials, other forums, software, fonts, etc. Bugs and support issues should go here as well.
URL: https://pixeljoint.com/forum/forum_posts.asp?TID=25352
Printed Date: 13 September 2025 at 10:56am
Topic: Managing color palette with multiple sprites
Posted By: CritiqueMyWork
Subject: Managing color palette with multiple sprites
Date Posted: 07 September 2016 at 5:30am
Say that you are making the sprites for a game. You split sprites in different files, depending on whether they belong to the same creature/map. To make the game looks consistent, you want to use the same colors across sprites. My question is:
- How do you store the palette to reuse it across sprites? - What if you want to change the value of certain sprite, do you make this change by hand for all the affected sprites?
|
Replies:
Posted By: eishiya
Date Posted: 07 September 2016 at 7:08am
Many image editors, especially pixel art oriented ones, support saving and importing palette files. The way to do this depends on the program you're using.
In Photoshop, if you go to Mode -> Color Table on an indexed image, you can Save and Load a palette there. However, loading a palette just replaces the actual values in order, it doesn't try to match the palette. So, saving the palette works great, but loading the palette only works if the colour order matches, which it often will not. If you want to automatically match the closest colours, you need to re-Index the image. Convert it to RGB, then back to Indexed, and in the dialog box, load your new palette as the Forced custom colours, and set the colour number to the number of colours in that palette.
I use PS which doesn't support paletted layers, and I like to keep my layers, so I can't just load a palette when I want to replace colours. So, I do change my colours by hand. Fortunately with pixel art it's pretty simple, I just need to use the Bucket tool with Contiguous set to Off, so that it fills all matching colours with the new colour. It is possible to write a script that does this automatically after being given a new palette, but I haven't gotten around to writing one myself.
I usually keep similarly-sized sprites in a single file, both to reduce disk reads in my games, and to make edits like this easier.
|
Posted By: DawnBringer
Date Posted: 07 September 2016 at 7:10am
You use a program that supports indexed palettes. The palette is saved with the image and changing a color in the palette changes the image along with it.
|
Posted By: CritiqueMyWork
Date Posted: 09 September 2016 at 11:10am
Mmm, indexed palettes is a great idea, i didn't thought about it. I don't use photoshop or the like because they are too complex for me, but maybe i can find the way to automate this. Thanks!
|
|