> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.formatting_utils.colored

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### colored

```python theme={null}
colored(
    text: object,
    color: str | None = None,
    on_color: str | None = None,
    attrs: Iterable[str] | None = None,
    *,
    no_color: bool | None = None,
    force_color: bool | None = None
) -> str
```

Colorize text.<br />Available text colors: <br />    black, red, green, yellow, blue, magenta, cyan, white,
light\_grey, dark\_grey, light\_red, light\_green, light\_yellow, light\_blue,
light\_magenta, light\_cyan.<br />Available text highlights: <br />    on\_black, on\_red, on\_green, on\_yellow, on\_blue, on\_magenta, on\_cyan, on\_white,
on\_light\_grey, on\_dark\_grey, on\_light\_red, on\_light\_green, on\_light\_yellow,
on\_light\_blue, on\_light\_magenta, on\_light\_cyan.<br />Available attributes: <br />    bold, dark, underline, blink, reverse, concealed.<br />Example: <br />    colored('Hello, World!', 'red', 'on\_black', \['bold', 'blink'])
colored('Hello, World!', 'green')

<b>Parameters:</b>

| Name          | Description                                                   |
| ------------- | ------------------------------------------------------------- |
| `text`        | **Type:** object                                              |
| `color`       | **Type:** str \| None<br /><br />**Default:** None            |
| `on_color`    | **Type:** str \| None<br /><br />**Default:** None            |
| `attrs`       | **Type:** Iterable\[str] \| None<br /><br />**Default:** None |
| `no_color`    | **Type:** bool \| None<br /><br />**Default:** None           |
| `force_color` | **Type:** bool \| None<br /><br />**Default:** None           |

<br />
