# Change shape background color

1. Select the shape by `name` you want to modify. See [here](https://docs.powerpointgeneratorapi.com/knowledge-base/finding-shape-names) 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](https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties) (e.g. `"black"`)

Reference: [shapes](https://docs.powerpointgeneratorapi.com/json-template-syntax/shapes "mention")

Download: [input.zip](https://drive.google.com/uc?export=download\&id=13sij2cc8hxK3wyOrSxy0Y3VeUX2-cZT-) | [output.pptx](https://drive.google.com/uc?export=download\&id=1PpHn2WHbSkNIa0zr_dzXosQ8oKn0xML_)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2F6veU8vv7xwz1noPiySAJ%2Ftemplate.png?alt=media&#x26;token=931441fc-1d72-4972-9c89-9e8837e09710" alt=""><figcaption></figcaption></figure>

***

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2Fhdv0WdP7IHLOn58u0GlQ%2Foutput.png?alt=media&#x26;token=11671708-1d48-42dd-8b3b-49c4c8ffbdb7" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "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"
            }
          }
        ]
      }
    ]
  }
}
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}
