We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get font color of a paragraph or Run in aspose word document using C#

I have a word document contains four paragraph. each paragraph has different font color. how can I identify the font color of each para. document also attached here.colourparas.docx (12.2 KB)

@vineeth.pv You can use Font.Color to get text color. The following code demonstrates how to get paragraph break color and child Run nodes color:

Document doc = new Document(@"C:\Temp\in.docx");

foreach (Paragraph p in doc.FirstSection.Body.Paragraphs)
{
    Console.WriteLine("Paragraph break color: {0}", p.ParagraphBreakFont.Color);
    foreach (Run r in p.Runs)
        Console.WriteLine("\tRun color: {0}", r.Font.Color);
}