Raxol.Terminal.ANSI.SGR.Handler (Raxol v2.0.1)
View SourceHandles 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
@spec apply_sgr_code(integer(), Raxol.Terminal.ANSI.TextFormatting.t()) :: Raxol.Terminal.ANSI.TextFormatting.t()
Applies a single SGR code to the style.
@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).
@spec handle_sgr(binary(), Raxol.Terminal.ANSI.TextFormatting.t()) :: Raxol.Terminal.ANSI.TextFormatting.t()
Handles an SGR sequence by parsing parameters and applying style changes.