# `Alaja.ANSI`
[🔗](https://github.com/Lorenzo-SF/alaja/blob/2.1.0/lib/alaja/ansi.ex#L1)

Pure ANSI escape code generators.

Returns strings containing ANSI escape sequences for cursor control,
screen manipulation, true-colour foreground/background, mouse event
handling, and alternate screen buffers.

# `alt_screen_off`

```elixir
@spec alt_screen_off() :: String.t()
```

Switches back to normal screen buffer.

# `alt_screen_on`

```elixir
@spec alt_screen_on() :: String.t()
```

Switches to alternate screen buffer.

# `bg`

```elixir
@spec bg(0..255, 0..255, 0..255) :: String.t()
```

Sets 24-bit true-color background.

Returns ANSI escape: `\e[48;2;R;G;Bm`

# `bold`

```elixir
@spec bold() :: String.t()
```

Turns bold text on (alias for `bold_on/0`).

# `bold_on`

```elixir
@spec bold_on() :: String.t()
```

Turns bold text on.

# `clear`

```elixir
@spec clear() :: String.t()
```

Clears the entire screen (alias for `clear_screen/0`).

# `clear_line`

```elixir
@spec clear_line() :: String.t()
```

Clears the current line.

# `clear_line_down`

```elixir
@spec clear_line_down() :: String.t()
```

Clears from cursor to the end of the screen.

# `clear_screen`

```elixir
@spec clear_screen() :: String.t()
```

Clears the entire screen.

# `cursor_home`

```elixir
@spec cursor_home() :: String.t()
```

Moves cursor to home position (1,1).

# `dim`

```elixir
@spec dim() :: String.t()
```

Turns faint/dim text on (alias for `faint_on/0`).

# `faint_on`

```elixir
@spec faint_on() :: String.t()
```

Turns faint/dim text on.

# `fg`

```elixir
@spec fg(0..255, 0..255, 0..255) :: String.t()
```

Sets 24-bit true-color foreground.

Returns ANSI escape: `\e[38;2;R;G;Bm`

# `hide_cursor`

```elixir
@spec hide_cursor() :: String.t()
```

Hides the terminal cursor.

# `italic`

```elixir
@spec italic() :: String.t()
```

Turns italic text on (alias for `italic_on/0`).

# `italic_on`

```elixir
@spec italic_on() :: String.t()
```

Turns italic text on.

# `mouse_off`

```elixir
@spec mouse_off() :: String.t()
```

Disables mouse tracking.

# `mouse_on`

```elixir
@spec mouse_on() :: String.t()
```

Enables mouse tracking (SGR extended mode).

# `mouse_sgr_off`

```elixir
@spec mouse_sgr_off() :: String.t()
```

Disables SGR mouse mode.

# `mouse_sgr_on`

```elixir
@spec mouse_sgr_on() :: String.t()
```

Enables SGR mouse mode.

# `move`

```elixir
@spec move(non_neg_integer(), non_neg_integer()) :: String.t()
```

Moves cursor to position (alias for `move_to/2`).

# `move_to`

```elixir
@spec move_to(pos_integer(), pos_integer()) :: String.t()
```

Moves cursor to position (1-indexed).

`col` is the column (x), `row` is the row (y).

# `reset`

```elixir
@spec reset() :: String.t()
```

Alias for `reset_attributes/0`.

# `reset_attributes`

```elixir
@spec reset_attributes() :: String.t()
```

Resets all text attributes.

# `restore_cursor`

```elixir
@spec restore_cursor() :: String.t()
```

Restores cursor position.

# `save_cursor`

```elixir
@spec save_cursor() :: String.t()
```

Saves cursor position.

# `show_cursor`

```elixir
@spec show_cursor() :: String.t()
```

Shows the terminal cursor.

# `underline_on`

```elixir
@spec underline_on() :: String.t()
```

Turns underline on.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
