Raxol.Terminal.ANSI.SGR.Handler (Raxol v2.0.1)

View Source

Handles parsing of SGR (Select Graphic Rendition) ANSI escape sequences. Translates SGR codes into updates on a TextFormatting style map.

Summary

Functions

Applies a single SGR code to the style.

Processes extended color sequences (256 color or RGB).

Handles an SGR sequence by parsing parameters and applying style changes.

Functions

apply_sgr_code(code, style)

Applies a single SGR code to the style.

handle_extended_color(arg1, style, type)

@spec handle_extended_color(
  [integer()],
  Raxol.Terminal.ANSI.TextFormatting.t(),
  :foreground | :background
) :: Raxol.Terminal.ANSI.TextFormatting.t()

Processes extended color sequences (256 color or RGB).

handle_sgr(params, style)

Handles an SGR sequence by parsing parameters and applying style changes.