I have a photoshop file with several layers (all shapes, no bitmaps). Is there any automatic way I could extract the colours from all these shapes into a palette? Any advice would be great!
I have a photoshop file with several layers (all shapes, no bitmaps). Is there any automatic way I could extract the colours from all these shapes into a palette? Any advice would be great!
2
Answers
Without knowing your source image, I can’t say for sure, but as far as I know, the only real palette exists with bitmap images of indexed color.
So you’d change your color mode to “indexed”, giving you a 256 color palette ready for export.
Depending on your use case that may already be enough – you can also try to export a file with as few colors as possible (saving a GIF), giving you the opportunity to filter down on the most used colors in your image.
You can do that from the commandline with ImageMagick if you want to. It is installed on most Linux distros and available for Mac OSX and Windows.
So, if I start with this Photoshop file:
and do this:
I get this (I have enlarged it 5000% so you can see it):
Or, if you want it as text: