in reply to Reading an image palette

As you note, the command-line tool identify -verbose prints the colormap.

I'm not sure if there's an API to return that information, but it's likely that the folks on the magick-users mailing list will know. You can also search the mailing list archive available at that link.