AutoColor
创建自动颜色。
语法
expression.AutoColor();
expression - 表示 Api 类的变量。
参数
此方法没有任何参数。
返回值
示例
在文档中创建自动颜色并将其用作字体颜色。
// How to auto color in a document?
// Auto color using the document API.
const doc = Api.GetDocument();
const color = Api.AutoColor();
const paragraph = doc.GetElement(0);
paragraph.AddText('This text is in auto color.');
paragraph.SetColor(color);