Skip to main content
Participant
July 18, 2019
Question

Photoshop. How do you reduce colors in an image but within a certain colour palette?

  • July 18, 2019
  • 3 replies
  • 1230 views

Tl;dr: Is there a way to make Photoshop not only change the colors in a image into those from a custom color palette, but also only choose spesificly 15 of the colors that are in the previously mentioned custom palette?

A game I play named Animal Crossing New Leaf allows for usermade paintings. I thought it would be fun to take any of the screenshoots you can make in the game, and turn them into a painting to hang on the wall in-game. Just scale the images down to 32x32 pixels in photoshop and replicate by hand. Well, turns out it's not that easy.

To start with, the game only has a color palette of about 159 spesific colors (Imgur: The magic of the Internet ). And out of them, only 15 of those 159 colors are allowed to be used per painting. So if I were to simply image>mode>indexedColor>local and reduce the colors present on the painting to 15, I would still have the problem of that potentially most of those colors are not available in the in-game palette.

I've tried to image>mode>IndexedColor>Custom(Change the palette to a custom one I made containing only the 159 in-game colors)>then turn the image back into a RGBColor And then repeat the image>mode>indexedColor>local method. Though this has brought me varied results. Like, using the (selective) modes on the indexed color menu gave some success, but also some that turned out colors not present in the palette.

I know that I could just try to roll with it, and make the color that appeared in the photoshop version be represented by a color from the in-game palette that fits. Though I fear that doing so may lead me to a scenario where two or more colors are best represented by the exact same in-game color. Potentially worsening the quality of the image.

I guess I could also use the Forced:(Custom) option on the indexed color menu to personally choose out 15 of the colors present on the fixed palette version of the image I want, to personally make sure that the colors that Photoshop picks are the ones present. Though if there was a way to make photoshop streamline that prosess, then it would be nice to know.

This topic has been closed for replies.

3 replies

JJMack
Community Expert
Community Expert
July 18, 2019

Crazy Idea.  Game Are normally player on computer or hand held displays that do not have your 1:1 aspect ratio and they display many more Pixels then  your square 32px by 32px image.   You captured game screen image would need to be cropped square and downsize to an image 32px by 32px. You will lose most of the details in your 1024 pixel image and now you want to lose most of your image's color.  Do you win or lose playing your game.

JJMack
Akash Sharma
Legend
July 18, 2019
c.pfaffenbichler
Community Expert
Community Expert
July 18, 2019

I think you made the point fairly clearly but just to make sure could you post examples, screenshots or sketches to clarify?

So far no method comes to my mind that would easily realise your intended process in Photoshop.

I suspect an automation with JavaScrpt might be possible (applying the 159 color table, evaluating which 15 colors are the most used, creating a new color table with just those and applying it to the original image).

This might take running the Eyedropper/Color Picker pixel by pixel, so that alone should make such a Script far from fast.

Maybe also post over on

Photoshop Scripting