Set shape color independently of font color

GroupDocs.Comparison 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 object. Specify the source document path or stream.
  2. Call the Add method. Specify the target document path or stream.
  3. Instantiate the CompareOptions object. Specify the ShapeColor for the InsertedItemStyle/DeletedItemStyle/ChangedItemStyle parameters.
  4. Set MarkChangedContent to true.
  5. Call the Comparer method. Specify the 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

using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
// ...

using (Comparer comparer = new Comparer("source.docx"))
{
    comparer.Add("target.docx");
    CompareOptions compareOptions = new CompareOptions()
    {
        DetectStyleChanges = true,
        MarkChangedContent = true,
        InsertedItemStyle = new StyleSettings()
        {
            FontColor = System.Drawing.Color.Blue,
            ShapeColor = System.Drawing.Color.Purple
        },
        DeletedItemStyle = new StyleSettings()
        {
            FontColor = System.Drawing.Color.Red,
            ShapeColor = System.Drawing.Color.Orange
        },
        ChangedItemStyle = new StyleSettings()
        {
            FontColor = System.Drawing.Color.Green,
            ShapeColor = System.Drawing.Color.LightGreen
        }
    }
    comparer.Compare("result.docx", compareOptions);
}

The result is as follows: