PptxGenJS

PowerPoint Shape Types

The library comes with over 180 built-in PowerPoint shapes (thanks to officegen project).

PowerPoint Scheme Colors

Scheme color is a variable that changes its value whenever another scheme palette is selected. Using scheme colors, design consistency can be easily preserved throughout the presentation and viewers can change color theme without any text/background contrast issues.

To use a scheme color, set a color constant as a property value:

slide.addText("Scheme Color 'text1'", { color: pptx.SchemeColor.text1 });

See the Shapes Demo for Scheme Colors demo

Scheme Demo

export enum SchemeColor {
    "text1" = "tx1",
    "text2" = "tx2",
    "background1" = "bg1",
    "background2" = "bg2",
    "accent1" = "accent1",
    "accent2" = "accent2",
    "accent3" = "accent3",
    "accent4" = "accent4",
    "accent5" = "accent5",
    "accent6" = "accent6",
}