集色器

secColor(r,g,b,sapiTextPr}

设置当前文本以RGB格式运行的文本颜色

参数:

名称 类型 默认 描述性
R 字节

红色组件值

g级 字节

绿色分量值

b/ 字节

蓝色组件值

IsAUT 布林安 虚伪

如果此参数设置为“ true”,rgb参数将被忽略

返回时间 :

类型
apiTextPr

实例

拷贝代码
builder.CreateFile("pptx")!varoPresentation=api.GetpresentationvaroSlide=oPresentation.getSlideByIndex0oSlide.RemoveAllObjects()!varoFinll =api.CreateSolidFillvarostroke=api.CreatestrokeVar Oshape = Api.CreateShapeoShape.SetPosition(608400, 1267200)!varoccontent=oshape.getdoccontentvarodente=occontent.getEplement0var ORun=api.CreateRunORun.AddText ("这是用字体颜色设置为黑的文本运行.")oParagraph.AddElement(oRun)!ORUN.SetColor(51515151)oSlide.AddObject(oShape)!builder.SaveFile("pptx", "SetColor.pptx")!builder.CloseFile();

结果文档