2

I have PDF files for designs and I'm wondering if there is any way I can extract the colors (as RGBA, RGB or HEX).

The best would be to annotate the PDF with the colors.

A command line tools would be awesome.

Thanks.

1
1

Install ImageMagick

  • sudo apt-get update && sudo apt-get install imagemagick

Use ImageMagick's identify

  • identify -verbose /path/to/PDF.pdf
  • Pull out Histogram section

Notes

Similar Question

3
  • I don't see any Histogram: pastebin.com/16e6pMFF. The text is in images so that may affect it – Dorian Apr 16 '14 at 17:53
  • I was using ImageMagick 6.6.9-7 2014-03-06 Q16. Does the Channel Statistics give you what you want? – earthmeLon Apr 16 '14 at 17:59
  • Not really, I would like specific colors, like a list, not averages – Dorian Apr 16 '14 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.