Jump to content

Extract image's color palette as .png etc.


Recommended Posts

Hey Dwight - welcome.

 

Try this plugin: 

 

The image colors will appear in the right hand pane. Beware: even an apparently simple image can have thousands of shades.

 

Once loaded take a screenshot of the plugin UI and crop to the color table.

Link to comment
Share on other sites

Hi @dwight

You are on the right track. You can see that your image is over 67K Colors Below the pic you will see a divide by slider bar.

As you move the slider it will reduce the number of colors to a point where it will begin to show you the colors in the window on the right hand side.

I think the break point is 1024 colors. At this point you would start doing screen captures of the colors shown to paste into a new image to get your graphic pallette.

Sounds like a lot of work - be careful what you wish for.

As you increase the multiplier it will reduce the number of colors shown. I think the window will show about 96 colors at a time. Once the number of colors shown is below 96 it allows you to save as a pallette.txt file (I know you don't want it) but there are plugins that allow you to create a layer based on the palette. A 2 step process to get want you want.

Hope this helps :)

 

 

 

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

There's CLUT transferring tool on G'MIC, and the command autoindex which will reduce the numbers of colors

 

-autoindex  count > 0

 0<= dithering <= 1,

method={ O=median-cut | 1=k-means }

 

-autoindex 2048,1,1 and then use the G'MIC CLUT tools if you want to use those colors for changing pictures. If you're interested in just the colors, G'MIC has an colormap command.

 

image.thumb.png.7521d4d890280008d1b1334e89ef17f2.png

 

The picture above demonstrate that the image has been turned into a palette. 1024x1 indicates that there are only 1024 colors. In Paint.NET, you would need to resize the image width to 1024 manually if and only if the size of the palette is greater than the width of your image, and then apply this.

 

Here's the output in PDN close-up

image.thumb.png.938fba23181f69c220461158fe8f9321.png

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

9 hours ago, dwight said:

I tried the plugin linked and it didn't show the image's color palette.

 

That's because there are 67114 colors. I did warn you 😉

 

The plugin is limited to showing around 1000 colors. If there is more, nothing shows up.

Link to comment
Share on other sites

 

13 hours ago, welshblue said:

Have you tried breaking it down into 2 smaller images - eg. the disk on it's own and then the thumbnails?

 

There's also some pretty good online palette generators.  Might be a bit more work but if something is worth having ...

 

10 hours ago, Reptillian said:

There's CLUT transferring tool on G'MIC, and the command autoindex which will reduce the numbers of colors

 

-autoindex  count > 0

 0<= dithering <= 1,

method={ O=median-cut | 1=k-means }

 

-autoindex 2048,1,1 and then use the G'MIC CLUT tools if you want to use those colors for changing pictures. If you're interested in just the colors, G'MIC has an colormap command.

 

image.thumb.png.7521d4d890280008d1b1334e89ef17f2.png

 

The picture above demonstrate that the image has been turned into a palette. 1024x1 indicates that there are only 1024 colors. In Paint.NET, you would need to resize the image width to 1024 manually if and only if the size of the palette is greater than the width of your image, and then apply this.

 

Here's the output in PDN close-up

image.thumb.png.938fba23181f69c220461158fe8f9321.png

 

sorry for being a little slow but, I'm trying ton use that to extract my image's color palette like this example that includes alpha.

 

https://i.postimg.cc/XvMcZc6B/dataface-c-layer0-0.png

 

 

Link to comment
Share on other sites

4 hours ago, dwight said:

 

 

 

sorry for being a little slow but, I'm trying ton use that to extract my image's color palette like this example that includes alpha.

 

https://i.postimg.cc/XvMcZc6B/dataface-c-layer0-0.png

 

 

 

I tested colormap command with alpha, and it does indeed work.

 

image.png.72cb0937ac97891869184751eb04ab4c.png

 

Do you want the alpha values and the color values to be separated.

Duplicate layer

 

If so, in code[local]

split_opacity

colormap [desired palette size],1,1

rv

 

Remove rv for one of those layers

 

and you'll get both of them separated. Mind you, there are 255 colors possible in alpha in PDN.

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...