foreTintAndShade property
Fill.foreTintAndShade property
Gets or sets a double value that lightens or darkens the foreground color.
get foreTintAndShade(): number
Exceptions
exception | condition |
---|---|
RuntimeError (Proxy error(ArgumentOutOfRangeException)) | Throw 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.
let doc = new aw.Document(base.myDir + "Big document.docx");
let textFill = doc.firstSection.body.firstParagraph.runs.at(0).font.fill;
textFill.foreThemeColor = aw.Themes.ThemeColor.Accent1;
if (textFill.foreTintAndShade == 0)
textFill.foreTintAndShade = 0.5;
doc.save(base.artifactsDir + "Shape.FillTintAndShade.docx");
See Also
- module Aspose.Words.Drawing
- class Fill