> For the complete documentation index, see [llms.txt](https://docs.powerpointgeneratorapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerpointgeneratorapi.com/examples/text-shape/set-font-color-and-font-background-color.md).

# Set font color and font background color

1. Select the shape by `name` you want to modify. See [here](/knowledge-base/finding-shape-names.md) to find shape names.
2. Specify the text need amending under `text_run`. Text within one textbox can be split into multiple chunks. &#x20;
3. Add font color setting `font_color` or font backgrount stetting `font_bg_color` for selected text under `text_properties`.
4. Insert either c[olor name](https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=windowsdesktop-7.0#properties) (e.g. black), RGB (e.g. 0,0,0), or [Hex](https://www.color-hex.com/) (e.g. #000000) as value for `font_color` and `font_bg_color`
5. Insert `new_line` as boolean before another `text_run`.&#x20;

Before and After

![](/files/zsGINst4gMoMjrr5LlD9)![](/files/eTFtLqLJAoQTIZlOqx0h)

Template Presentation

{% file src="/files/DFvKU5H9m59hW5cHAqRp" %}

JSON Payload

{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "slides_as_template_text_font_color.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Title 1",
            "text": [
              {
                "text_run": "Text color",
                "text_properties": {
                  "font_color": "147, 147, 132"
                }
              },
              {
                "text_run": "Text background color",
                "text_properties": {
                  "font_bg_color": "#f5f5dc"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endcode %}
