# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/examples/text-shape/set-font-color-and-font-background-color.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
