If you are doing this in Acrobat, then you'll need to write a plug-in using C++ and the Acrobat SDK. If you want to do this outside of Acrobat, then you'll need a library with sufficient granularity to expose the color resources. For example, iText, PDFBox, PDFLib, or the official PDF library licensed by Datalogics. You can already view this information in several ways. For example, load the PDF into InDesign, although this doesn't work for all PDFs. There several 3rd party tools for printing that specifically show this type of info. PDF CanOpener (COS Level Editor for PDF ) is a 3rd party tool for exposing the raw COS structure of a PDF, so you can see exactly how the color resources are structured. This tool is indispensable when you are writing tools that operate at this level.
Regardless of what you do you'll need to read the PDF Specification. Google it.
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often