So you want your sprites to be 16 colors
Pixel dynamo Judas recently had a pesky problem that one typically runs into as an experienced pixel pusher: midway through his latest sprite, he found he had too many colors
Newcomers may ask what that means and why it’s a problem, and the answer has to do with technical accuracy. If you’re simply building a sprite to have fun, then it isn’t a problem; the color count is irrelevant. But if you’re a more serious hobbyist who likes to imitate the professionals and work within the constraints they do when making the games you like to play, then you have a few more rules to play by — one of them being the number of colors you’re allowed to use. In short, games like Street Fighter 2 and King of Fighters use 16-bit graphics, which means the characters must have only 15 colors of pixels, plus one color for their transparent background. This is in order to keep within the limits of the games’ graphics hardware.
High color count problems usually come up when you’re just casually doing a sprite and getting lost in the flow, picking satisfying colors as you go along, and then discovering the issue after you’ve put a lot of work into it. By then you’re pretty much married to the colors because they’ve been in front of you the whole time that you were making so many decisions about the sprite, and thus influencing numerous choices about small details. A vexing example being how strong an outline to put around a strand of hair overlapping the face.
The first step is to be brutal and detach yourself from the color choice. I knew right off the bat that this sprite was going to need to share a few colors between the skintones and yellow hair (a common trick in many sprites), and even I was going to be sorry to see that gorgeous pale-orange shade of yellow get switched out.
The next step is to find any easy targets that a casual observer wouldn’t notice. In this case, there were two shades for the bluegreen areas on the outfit, which took up so few pixels that they could safely be reduced to one. Note that even though it only took up a few pixels of space, the bluegreen color couldn’t be eliminated altogether because it was providing an accent color to the reds and yellows.
So that leaves 19 colors, with three colors to reduce. Time to fire up GIMP/Photoshop’s secret weapon for pixel artists: Indexed Mode. This tool will save you an enormous amount of time if used well, and help reduce your decision-making to simple math. In PS, making sure the sprite’s in RGB Mode, go to IMAGE > MODE > INDEXED COLOR. In the set of options that pop up, set the Palette to Local Perceptual, the colors to 16, the Forced to None and check the Transparency box (if your background is currently transparent, like this one is). You’ll now be getting Photoshop’s opinion of what three of those 19 colors can be eliminated and which of the other existing colors they can be replaced with.
Hurrah! We’re done! ..Oh wait, it’s saying that mathematically, the brightest skin shade should be replaced with the light gray. Well that obviously won’t look right to non-calculators like us. It’s also saying some of the light grays and the white should be merged together, but that doesn’t look right to my human eye because A) those grays are used for important details, and B) they’re used a lot and in large, noticeable areas. What I was really hoping for was to merge together some of the skintone and yellow hair, and maybe blend a dark red into the brown of the skin. I’d rather not touch the grays.
So then we need to tell Photoshop that some colors are off-limits for this calculation. First I make a new copy with “Create a new document from current state” command so I don’t accidentally overwrite the original image. Then using the Magic Wand tool, (Tolerance: 1, Anti-alias and Contiguous unchecked), I select all those blacks, grays, whites, bright reds and the bluegreen that I know I don’t want to change, and delete them. I do a convert to Indexed Mode and change the Palette to Exact to see how many colors that leaves me with. It tells me 10 with the transparency, and I still want to eliminate three, so I switch the Palette back to Local Perceptual and switch the colors to seven and let’s see what happens..
As expected, it changes the skintones to the hair yellows, showing me that the shades of the hair can be switched out for the skin. Ah, but which is it, do I use the skintone as the new hair color (making the hair look bleached), or the hair as the new skintone (making the skin really yellow)? The answer: compromise. I’m going to blend the two together and get the best of both worlds. Take the Pencil at 50% opacity and eyedropper the skin color, then pencil that color over the hair color. The 50% mixture means you’ve got a skintone that won’t be too yellow and a hair color that won’t be too bright. (Tip: if you want even less yellow in your skin, dab the pencil on the new mixed color one more time with the original skin color while still at 50%, and you’ll cut the yellow in half again.) Eyedropper that new color and Fill Tool both the skin and hair shade with their new compromise color. Repeat for the other pairs of colors. Finally, go back to the original sprite and paste the new colors over it. Voilà.
With this technique, on the condition that you’ve made at least some effort initially to limit your color choices, you could potentially reduce almost anything to a 16-bit version of your palette without a significant change to its look.
Indexed Mode. It’s like a pocket calculator for colors.