ForeTintAndShade

Fill.ForeTintAndShade property

Gets or sets a double value that lightens or darkens the foreground color.

public double ForeTintAndShade { get; set; }

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionThrow if set this property to a value less than -1 or more than 1.

Remarks

The allowed values are in the range from -1 (the darkest) to 1 (the lightest) for this property.

Zero (0) is neutral.

Examples

Shows how to manage lightening and darkening foreground font color.

Document doc = new Document(MyDir + "Big document.docx");

Fill textFill = doc.FirstSection.Body.FirstParagraph.Runs[0].Font.Fill;
textFill.ForeThemeColor = ThemeColor.Accent1;
if (textFill.ForeTintAndShade == 0)
    textFill.ForeTintAndShade = 0.5;

doc.Save(ArtifactsDir + "Shape.FillTintAndShade.docx");

See Also