Raxol.Terminal.Commands.OSCHandlers.Color (Raxol v0.5.0)

View Source

Handles color-related OSC commands.

This handler manages terminal colors, including:

  • Foreground color
  • Background color
  • Cursor color
  • Selection colors

Supported Commands

  • OSC 10: Set/Query foreground color
  • OSC 11: Set/Query background color
  • OSC 12: Set/Query cursor color
  • OSC 17: Set/Query selection background color
  • OSC 19: Set/Query selection foreground color

Summary

Functions

Handles OSC 10 command to set/query foreground color.

Handles OSC 11 command to set/query background color.

Handles OSC 12 command to set/query cursor color.

Handles OSC 17 command to set/query selection background color.

Handles OSC 19 command to set/query selection foreground color.

Handles OSC 110 command to reset foreground color.

Handles OSC 111 command to reset background color.

Handles OSC 112 command to reset cursor color.

Handles OSC 117 command to reset selection background color.

Handles OSC 119 command to reset selection foreground color.

Functions

handle_10(emulator, data)

Handles OSC 10 command to set/query foreground color.

handle_11(emulator, data)

Handles OSC 11 command to set/query background color.

handle_12(emulator, data)

Handles OSC 12 command to set/query cursor color.

handle_17(emulator, data)

Handles OSC 17 command to set/query selection background color.

handle_19(emulator, data)

Handles OSC 19 command to set/query selection foreground color.

handle_110(emulator, data)

@spec handle_110(Raxol.Terminal.Emulator.t(), String.t()) ::
  {:ok, Raxol.Terminal.Emulator.t()}
  | {:error, term(), Raxol.Terminal.Emulator.t()}

Handles OSC 110 command to reset foreground color.

handle_111(emulator, data)

@spec handle_111(Raxol.Terminal.Emulator.t(), String.t()) ::
  {:ok, Raxol.Terminal.Emulator.t()}
  | {:error, term(), Raxol.Terminal.Emulator.t()}

Handles OSC 111 command to reset background color.

handle_112(emulator, data)

@spec handle_112(Raxol.Terminal.Emulator.t(), String.t()) ::
  {:ok, Raxol.Terminal.Emulator.t()}
  | {:error, term(), Raxol.Terminal.Emulator.t()}

Handles OSC 112 command to reset cursor color.

handle_117(emulator, data)

@spec handle_117(Raxol.Terminal.Emulator.t(), String.t()) ::
  {:ok, Raxol.Terminal.Emulator.t()}
  | {:error, term(), Raxol.Terminal.Emulator.t()}

Handles OSC 117 command to reset selection background color.

handle_119(emulator, data)

@spec handle_119(Raxol.Terminal.Emulator.t(), String.t()) ::
  {:ok, Raxol.Terminal.Emulator.t()}
  | {:error, term(), Raxol.Terminal.Emulator.t()}

Handles OSC 119 command to reset selection foreground color.