Get Started
Usage API
More information

CreateRGBColor

CreateRGBColor(r, g, b) → { ApiRGBColor }

Creates an RGB color setting the appropriate values for the red, green and blue color components.

Parameters:

Name Type Description
r byte

Red color component value.

g byte

Green color component value.

b byte

Blue color component value.

Returns:

Type
ApiRGBColor

Example

Copy code
builder.CreateFile("pptx");
oPresentation = Api.GetPresentation();
oSlide = oPresentation.GetSlideByIndex(0);
oRGBColor = Api.CreateRGBColor(255, 164, 101);
oGs1 = Api.CreateGradientStop(Api.CreatePresetColor("lightYellow"), 0);
oGs2 = Api.CreateGradientStop(oRGBColor, 100000);
oFill = Api.CreateRadialGradientFill([oGs1, oGs2]);
oStroke = Api.CreateStroke(0, Api.CreateNoFill());
oDrawing = Api.CreateShape("flowChartMagneticTape", 300 * 36000, 130 * 36000, oFill, oStroke);
oSlide.AddObject(oDrawing);
builder.SaveFile("pptx", "CreateRGBColor.pptx");
builder.CloseFile();

Resulting document