How to enable the Auto color property

Hi team,
I used below mention code to enable the Auto color but its not working kindly help me.

NodeCollection nodes = doc.GetChildNodes(NodeType.Paragraph, true);
foreach (Paragraph para in nodes)
{
    if (para.ParagraphFormat.StyleIdentifier == StyleIdentifier.Heading2)
    {
        foreach (Run r in para.Runs)
        {
            r.Font.Size = 11;
            r.Font.AutoColor
        }
    }
}

Any update on this?

@Princeshivananjappa Font.AutoColor property returns the present calculated color of the text (black or white) to be used for ‘auto color’. You cannot set this property. In your case it would be enough to simply clear explicit formatting of the Run. In this case, color will lbe inherited from the style, theme or automatically calculated:

r.Font.ClearFormatting();
r.Font.Size = 11;