Font color in table cell is incorrect

I have a PPT document with a table and text in the table that’s colored white. When I look at the font color in Aspose code, the color is black (RGB 0,0,0). The attached project demonstrates the issue.ConsoleApp1 - to (39.9 KB)

Welcome to our community! Thank you for your request. In your case, the portion fill format is not defined. To get actual format properties, you should use GetEffective method as below:


More details: Shape Effective Properties

That worked, thank you!

Andrey, is there a way to “set effective” on a paragraph or portion to apply formats copied from one to another?

The effective format values are finally calculated values based on local values and inheritance from parent components. For example, if you set a text color (local value) to a paragraph, then all its portions will be the same text color by default (effective value).

paragraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
paragraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Green;

var firstPortion = paragraph.Portions[0];
Color portionColor = firstPortion.PortionFormat.FillFormat.GetEffective().SolidFillColor; // will be green

But a text color for any portion can be specified separately. You can and should set local values only.
API Reference: FillFormat Class