# Module /ansi

ANSI terminal escape sequences for foreground/background styling, 256-color/RGB output, and text weights.

```tangu
(use /ansi)
```

## Functions & symbols

### blue

`(blue s)`

Wraps `s` in ANSI foreground blue (`\x1b[34m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### bold

`(bold s)`

Wraps `s` in ANSI bold formatting (`\x1b[1m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### colored

`(colored styles text)`

Conditionally wraps `text` in ANSI `styles` when `(tty/color-enabled?)` is `true`, or returns plain `text` when `false`.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `styles` | `Any` | no | — |
| `text` | `Any` | no | — |

### cyan

`(cyan s)`

Wraps `s` in ANSI foreground cyan (`\x1b[36m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### dim

`(dim s)`

Wraps `s` in ANSI dim/faint formatting (`\x1b[2m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### gray

`(gray s)`

Wraps `s` in ANSI foreground bright black / gray (`\x1b[90m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### green

`(green s)`

Wraps `s` in ANSI foreground green (`\x1b[32m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### italic

`(italic s)`

Wraps `s` in ANSI italic formatting (`\x1b[3m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### magenta

`(magenta s)`

Wraps `s` in ANSI foreground magenta (`\x1b[35m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### red

`(red s)`

Wraps `s` in ANSI foreground red (`\x1b[31m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### reset

`(reset)`

Returns the ANSI SGR reset sequence (`\x1b[0m`).

### style

`(style styles text)`

Purely wraps `text` in a single combined ANSI SGR sequence for `styles` (a style symbol like `:red` or an Array like `[:bold :red]`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `styles` | `Any` | no | — |
| `text` | `Any` | no | — |

### underline

`(underline s)`

Wraps `s` in ANSI underline formatting (`\x1b[4m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### white

`(white s)`

Wraps `s` in ANSI foreground white (`\x1b[37m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |

### yellow

`(yellow s)`

Wraps `s` in ANSI foreground yellow (`\x1b[33m...\x1b[0m`).

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `s` | `Any` | no | — |
