PDA

View Full Version : Extracting a clean palette from an image using Photoshop



D Akey
08-04-2006, 08:42 PM
This is about getting a clean sample palette as a starting point for painting in ArtRage.

Ever noticed how picking a color from a reference pic can be dicey? Not all the colors of all the pixels are clean, because they are optically blending. Zoom way in and you will see how the diverse pixels are sitting aside each other -- expecially if you're working from a printed photo.

Well, if you have Photoshop, there's an easy way to break a full value and color picture down into a managable palette of clean color that you know will be pure when picking/sampling a color to paint with. (If you don't have Photoshop, there are undoubtedly other ways of getting at this. But this is the principle.)

1) Open your original picture in PS.

D Akey
08-04-2006, 08:47 PM
2) Then go to File > Save For Web.

That window that opens is an interface to see how far you need to compress your image so it will load smoothly on a webpage.

But the part I want to point out is the palette to the right of the image.

Pick GIF and you will be able to choose the number of colors you want to compress it down to.

Voila! Your palette.

Careful that you don't over compress it, as after a point it starts eliminating key colors. So you can play with it so that there aren't too many nor too few.

D Akey
08-04-2006, 08:59 PM
3) In order to pull only the color palette off to be used it takes two steps.

Do a screen grab. Macs use: [Command/Apple]+[Shift]+[3]
PCs use: Print Screen (to the right of the function keys at the top of the keyboard)

Now the image is either saved (Mac) or in your copy buffer (PC). (I'm doing this PC part from memory, so please correct me if I'm wrong.)

So with Mac. open the file in Photoshop (in my case screengrabs get saved to my Desktop and it's named 'picture1', 'picture2' etc).

Or with PC you can, as I recall, open File > New > Ok and it will open the grab from your buffer. And if the image is not in the new window, then just paste it in [Ctrl]+[V] or Edit > Paste.

D Akey
08-04-2006, 09:24 PM
4) You can't see it in my previous post because the colors are clear against a white background, so it looks white. But there's a way to isolate the colors on a clear field so that you don't accidentally pick white (as if you wouldn't notice. . .). Not essential, but it's a small matter to do.

In PS, in the Layers palette, double click on the only layer called 'Background'. just rename it the default 'Layer 0' in order to make it floating. Again, not sure about everybody's, but it MAY get pasted in, in which case delete the background layer and that's it.

In short, you want that layer with the palette to be floating over clear like the ascetate cell AR talks about.

Then go to your Tools Palette and pick your Wand Tool. With it, go to your image and select the black line in between the colors.

Go to Select > Modify > Expand (by 1 px).

And cut it away. Edit > Cut.

Save the remaining image as a .psd (Photoshop) or .png.

Finally, you can import it into ArtRage:

Tools > Open a Reference Image
and find where that pic was saved and select it to open and click Open.

The cool thing about this is that you can use that palette forever, and as a started for any new picture too, and it will give you clean color every time. What you see is what you get, as they say. Flat Color.

Another bonus is that you can still load the original reference pic to look at as you paint. (or trace or whatever).

I hope I was being clear. I'm going to go stick my head in a bucket of ice water now. Even MY eyes are crossing from all the details!

Bottom line is that it's really easy when you know how to do it. Takes all of two minutes to get a palette. That's quick.

Enjoy!

ENCHANTER
08-05-2006, 05:20 AM
thanks for that!

shellcrackerjr
02-24-2009, 03:54 AM
can you do the same thing with GIMP?

earthmama
02-25-2009, 05:22 PM
yes d akey, how else can this be done???
i'm working on a portrait of my mother in law, but only have a couple of super grainy teensy snapshots to work from and i'm tired of picking up purples and hot pinks instead of flesh colors! my husband the shutterbug, also loves the scissors a bit too much.:D

Someonesane
02-25-2009, 10:34 PM
Well, it isn't as precise as D Akey's method, but I may have another way that could work. It requires the use of Microsoft Paint (which has always come free with every Windows operated system I've owned). It's pretty easy to do, but not so easy to discribe, so I made a video to demenstrate how to do it. You can watch it at YouTube HERE (http://www.youtube.com/watch?v=mijKhwesP_A), or download a higher quality version of it HERE (http://www.mediafire.com/file/jyjegqtugyq/ColorPalette.wmv).

I also found a couple links online that will convert an image into an indexed color palette, but they of course have limits as well (amount of colors, needing to be online, etc). Here are the links for the two sites I found:

link1 (http://jrm.cc/color-palette-generator/index.php)

link2 (http://www.degraeve.com/color-palette/)

earthmama
02-26-2009, 03:45 AM
i'll be trying that soon. thank you someonesane! you've made my day:)

Someonesane
02-26-2009, 12:00 PM
i'll be trying that soon. thank you someonesane! you've made my day:)

No problem :cool:.

I've actually painted this apple a number of times for various reasons ranging from testing my drawing tablet, to testing how far my own skills have come. Once again, I have used the image to test how close I could come to the actual picture (in terms of color values this time) using only the index color chart I made from the image. For the relatively small amount of time I put into this image, this time around, I'm actually pretty happy with the results. I'll probably try using a color index more often.


25263
25264

earthmama
02-26-2009, 05:23 PM
someonesane, i tried it in ms paint and it works just like you showed. i just kept coming up with almost the same colors. :( oh well, i guess i'll just have to use my imagination. jeez, i haven't done that in so long.
and you should be happy with the results, that's an awesome apple. looks good enough to eat.

Someonesane
02-26-2009, 06:28 PM
Yeah, like I said, It's not very precise. It's because the program is only calculating the best combination of colors it can use to represent the image at such a small size, then stretching those colors when it is enlarged again. If you have an image where there is a lot of one color, but then have a few areas with a completely other color, the dominate color of the image will likely take precedence. Take the following image for example:

25279

The entire background is made up of grayish blue hues and the skaters shirt, paints, and skin tone takes up less area. So when I shrink and expand this image I end up with the following:

25280

As you can see, the gray background color overtakes most of the other colors, so I don't get a good assortment of the skaters flesh tones. The few colors I get for the pants and shirt would probably work, but could be better.

To fix this, I tried only stretching the image from right to left at first, which resulted in the following colors:

25281

Now there are a lot more colors to choose from, but it's really a bit more then needed. So I stretch it again, this time from bottom to top. But I only squish the image to about three quarters of it's original size this time. This keeps enough of the colors in the image for them to blend together, without completely getting merged into the gray tones of the background and I end up with the following:

25282

Now I should be left with enough colors to get the essential parts of the image done.

Jules
04-19-2009, 04:33 AM
Thanks for that D'akey it took some careful reading, but it works!
It also works in photoshop elements :cool:

flyashy
06-02-2009, 06:19 AM
HOHO!! Someonesane!!
That's a brilliant shortcut to arrive at the essential colors...
It works just great!!!
I never thought of using it for color. I mean I've shrunk images before and enlarged them to use as references (so that there's some freedom and I don't get bound by the original) but to use it to generate a minimal palette is just sheer genius!!

thanks a ton!
ashy

downtide
06-07-2009, 10:07 AM
Two quick ways to get the same result in Paintshop Pro:

1) Effects > Distortion > Pixelate.
This one is dead easy. You can vary block size depending on how many colours you want in the palette. Then just save the result as a new jpg with a different filename.

2) Image > Decrease colour depth > X colours
Again here pick a number that makes for a good balance, not too many or too few. I used 64 in this example (screenshot attached). You should be on the middle tab of the colour palette (in the top right part of the screen). Then take a screenshot, save it in a new file name, and reload it into PSP, and crop it down to just the palette section. You might want to enlarge it a bit before re-saving to be your reference image.

byroncallas
06-10-2009, 08:31 PM
Downtide, will have to try this (I have Paintshop Pro). It seems brilliantly easy, will give it a shot.)


Two quick ways to get the same result in Paintshop Pro:

1) Effects > Distortion > Pixelate.
This one is dead easy. You can vary block size depending on how many colours you want in the palette. Then just save the result as a new jpg with a different filename.

2) Image > Decrease colour depth > X colours
Again here pick a number that makes for a good balance, not too many or too few. I used 64 in this example (screenshot attached). You should be on the middle tab of the colour palette (in the top right part of the screen). Then take a screenshot, save it in a new file name, and reload it into PSP, and crop it down to just the palette section. You might want to enlarge it a bit before re-saving to be your reference image.

byroncallas
06-10-2009, 09:21 PM
Downtide, this is unbelievably easy in Paintshop Pro, both versions as you've described. Makes a remarkbly clean pallet. I think I prefer the second method, but both are great.

Do you know if there is a way from either version to quickly convert the pallet to place like color and shade blocks beside each other in order of gradation. That would be useful too.

Terrific tip for those of us with Paintshop Pro.

Thanks,
Byron

bbbOK
12-20-2009, 04:38 PM
[QUOTE=Someonesane;164727]Well, it isn't as precise as D Akey's method, but I may have another way that could work. It requires the use of Microsoft Paint (which has always come free with every Windows operated system I've owned). It's pretty easy to do, but not so easy to discribe, so I made a video to demenstrate how to do it.

That is the COOLEST simplification of grabbing a palette I have ever known. THANK YOU. This way I avoid loading my heavy PS and can grab palette and move into ArtRage (or anything) quickly. Wow!

Happy happy.(I do a lot of palettes)

I am SO glad I took the moment to watch this! Thanks again for sharing this. :D

Someonesane
12-20-2009, 04:54 PM
I am SO glad I took the moment to watch this! Thanks again for sharing this. :D

No problem :cool:

Judith Tramayne
12-20-2009, 05:18 PM
Someonesane you are a genius! Just subscribed to your videos! What a terrific voice you have.

Judith

Silentman
12-20-2009, 07:47 PM
Excellent tip DAkey, can't believe i didn't think of this before, i use save for web all the time, it's an excellent way to save for the forum, i actually get smaller Png's at better quality than Jpegs out of the "Save for Web" in Photoshop, a great little extension indeed :)

Lima
02-07-2010, 11:54 AM
Very nice. Great idea:eek: DAkey

Jim Gahl
02-09-2010, 08:51 AM
Hi D Akey,

Your post was appreciated. Getting a manageable color palette is really useful.

I was able to follow your directions except when it got down to getting the reduced gif palette in PS out and into AR.

Doing a screen print on my PC gave me the whole PS window including the image, etc. Do you have any suggestions how I can just grab just the reduced palette in the Save for Web and Devices window in PS?

If I select DONE in that window, the image turns to the reduced color palette in PS. I can save the image and open it in Painter and create a color set with those colors. Works great!

Or I can save the color table out of PS as an ACT file.

But, I can't figure out how to get either the ACT or the narrowed palette from PS into AR. Is there a way in AR to convert an image into a color sample set? or use the ACT file?

I hope this makes sense..... Thanks, in advance, for any help you can give me.

Cordially,

Jim Gahl

Sunflower
02-11-2010, 10:12 AM
Regarding the Pixelate filter in Photoshop and Paint Shop Pro, I've discovered that the same filter is available for use in the free online editor Sumo Paint. Handy for those like me who don't have the above software programs.

jlward
04-09-2010, 05:56 PM
If you're using the Photoshop swatches in Photoshop, you can also click on the arrow next to Color Table/Image Size and choose Save Color Table. Of course, that doesn't do anything to help you get those colors into ArtRage. For that, you'll need to do the screen capture described below.


3) In order to pull only the color palette off to be used it takes two steps.

Do a screen grab. Macs use: [Command/Apple]+[Shift]+[3]
PCs use: Print Screen (to the right of the function keys at the top of the keyboard)

Now the image is either saved (Mac) or in your copy buffer (PC). (I'm doing this PC part from memory, so please correct me if I'm wrong.)

So with Mac. open the file in Photoshop (in my case screengrabs get saved to my Desktop and it's named 'picture1', 'picture2' etc).

Or with PC you can, as I recall, open File > New > Ok and it will open the grab from your buffer. And if the image is not in the new window, then just paste it in [Ctrl]+[V] or Edit > Paste.