Set shape color independently of font color
Leave feedback
On this page
GroupDocs.Comparison for Python via .NET lets you control colors for shapes separately from font colors.
Enable style detection and specify separate shape colors per change type.
import groupdocs.comparison as gc
with gc.Comparer("source.docx") as comparer:
comparer.add("target.docx")
options = gc.CompareOptions()
options.detect_style_changes = True
options.mark_changed_content = True
options.inserted_item_style = gc.StyleSettings(
font_color=gc.Color.from_name("blue"),
shape_color=gc.Color.from_name("purple"),
)
options.deleted_item_style = gc.StyleSettings(
font_color=gc.Color.from_name("red"),
shape_color=gc.Color.from_name("orange"),
)
options.changed_item_style = gc.StyleSettings(
font_color=gc.Color.from_name("green"),
shape_color=gc.Color.from_name("lightgreen"),
)
comparer.compare("result.docx", options)
🔹 Use case: Emphasize shape modifications (e.g., diagrams) without altering text color coding.
The result is as follows:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.