1. A method performed by a physical computing system comprising at least one processor for determining a color palette model from an image of a document, said method comprising: clustering pixel values of the image of the document to provide image clusters; determining color layers of the image, wherein each color layer corresponds to an image cluster; for a content block detected in a first color layer of the image of the document, determining a second color layer of the image of the document for which a coincident content block is detected in the inverse color layer of that second color layer; and determining the color of the first color layer and the color of the second color layer as a foreground-background color pair for the content block in a color palette model of the image of the document, wherein the clustering, determining color layers, determining a second color layer, and determining the foreground-background color pair are performed using the computing system.