Skip to main content

CreateSchemeColor

Creates a complex color scheme selecting from one of the available schemes.

Syntax

expression.CreateSchemeColor(schemeColorId);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
schemeColorIdRequiredSchemeColorIdThe color scheme identifier.

Returns

ApiSchemeColor

Example

This example shows how to create a scheme color with the 'dk1' identifier.

var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
var oSchemeColor = Api.CreateSchemeColor("dk1");
var oFill = Api.CreateSolidFill(oSchemeColor);
var oStroke = Api.CreateStroke(0, Api.CreateNoFill());
var oDrawing = Api.CreateShape("curvedUpArrow", 300 * 36000, 130 * 36000, oFill, oStroke);
oSlide.AddObject(oDrawing);
oDrawing.SetPosition(608400, 1267200);