private Set<String> extractFillColors(Document document) throws XPathExpressionException {
        Set<String> colors = new HashSet<String>();

        Element root = document.getDocumentElement();
        XPathExpression xPathExpression = xml.compileXPath("descendant::*[@fill]/@fill");
        NodeList nodeList = (NodeList)xPathExpression.evaluate(root, XPathConstants.NODESET);
        for(int i=0;i<nodeList.getLength();i++) {
            Node node = nodeList.item(i);
            colors.add(node.getNodeValue());
        }
        return colors;
    }