get color of image palette

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
pedroko

get color of image palette

Post by pedroko »

I have a questions for command line image magick
I know there is a color in a image palette, buy i need the index of this color in the palette. Is there a way to know it?
Thank you
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: get color of image palette

Post by snibgo »

identify -verbose input.png

will write the palette to stdout. Your script could then search for the colour.
snibgo's IM pages: im.snibgo.com
Post Reply