# Set shape color independently of font color Following this guide you will learn how to set shape color independently of font color and modify appearance of detected changes when use GroupDocs.Comparison for Java. [GroupDocs.Comparison](https://products.groupdocs.com/comparison/java) provides the option to specify the color for changed shapes. To compare two documents with custom change color for shapes, follow these steps: 1. Instantiate the [Comparer](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison/comparer) object. Specify the source document path or stream. 2. Call the [add()](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison/comparer/#add-java.lang.String-) method. Specify the target document path or stream. 3. Instantiate the [CompareOptions](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options/compareoptions) object. Specify the [ShapeColor](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options.style/stylesettings/#setShapeColor-java.awt.Color-) for the [InsertedItemStyle](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options/compareoptions/#setInsertedItemStyle-com.groupdocs.comparison.options.style.StyleSettings-)/[DeletedItemStyle](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options/compareoptions/#setDeletedItemStyle-com.groupdocs.comparison.options.style.StyleSettings-)/[ChangedItemStyle](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options/compareoptions/#setChangedItemStyle-com.groupdocs.comparison.options.style.StyleSettings-) parameters. 4. Set [MarkChangedContent](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options/compareoptions/#setMarkChangedContent-boolean-) to `true`. 5. Call the [compare()](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison/comparer/#compare-java.lang.String-) method. Specify the [CompareOptions](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options/compareoptions) object. The following code snippets show how to compare documents with specific color options for shapes: ## Compare documents from local disk with custom change color for shapes {{< tabs "example1">}} {{< tab "Java" >}} ```java import com.groupdocs.comparison.Comparer; import com.groupdocs.comparison.options.CompareOptions; import com.groupdocs.comparison.options.style.StyleSettings; import java.awt.Color; // ... try (Comparer comparer = new Comparer("source.docx")) { comparer.add("target.docx"); CompareOptions compareOptions = new CompareOptions(); compareOptions.setDetectStyleChanges(true); compareOptions.setMarkChangedContent(true); final StyleSettings insertedStyleSettings = new StyleSettings(); insertedStyleSettings.setFontColor(Color.BLUE); insertedStyleSettings.setShapeColor(new Color(128, 0, 128)); // purple compareOptions.setInsertedItemStyle(insertedStyleSettings); final StyleSettings deletedStyleSettings = new StyleSettings(); deletedStyleSettings.setFontColor(Color.RED); deletedStyleSettings.setShapeColor(Color.ORANGE); compareOptions.setDeletedItemStyle(deletedStyleSettings); final StyleSettings changedStyleSettings = new StyleSettings(); changedStyleSettings.setFontColor(Color.GREEN); changedStyleSettings.setShapeColor(new Color(144, 238, 144)); // light green compareOptions.setChangedItemStyle(changedStyleSettings); comparer.compare("result.docx", compareOptions); } ``` {{< /tab >}} {{< /tabs >}} The result is as follows: ![](https://docs.groupdocs.com/comparison/java/images/set-shape-color-independently-of-font-color.png) ## See also - [Customize changes styles]({{< ref "comparison/java/advanced-usage/comparison/customize-changes-styles.md" >}}) - [StyleSettings API reference](https://reference.groupdocs.com/comparison/java/com.groupdocs.comparison.options.style/stylesettings/)