Change shape background color

Easily change a shape's interior color

  1. Select the shape by name you want to modify. See here to find shape names.

  2. Set the fill_color property inside the settings object to change a shape’s background color.

  3. Define fill_color with a:

    1. Hex code (e.g. "#000000") or

    2. RGB (e.g. "0,0,0") or

    3. Color name (e.g. "black")

Reference: shapes

Download: input.zip | output.pptx


{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Rectangle 1",
            "settings": {
              "fill_color": "#C916D4"
            }
          },
          {
            "name": "Rectangle 5",
            "settings": {
              "fill_color": "255, 165, 119"
            }
          },
          {
            "name": "Chart 6",
            "settings": {
              "fill_color": "beige"
            }
          }
        ]
      }
    ]
  }
}

Last updated

Was this helpful?