Raxol.Terminal.Commands.OSCHandlers.Color (Raxol v0.5.0)
View SourceHandles 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
@spec handle_10(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, term(), Raxol.Terminal.Emulator.t()}
Handles OSC 10 command to set/query foreground color.
@spec handle_11(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, term(), Raxol.Terminal.Emulator.t()}
Handles OSC 11 command to set/query background color.
@spec handle_12(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, term(), Raxol.Terminal.Emulator.t()}
Handles OSC 12 command to set/query cursor color.
@spec handle_17(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, term(), Raxol.Terminal.Emulator.t()}
Handles OSC 17 command to set/query selection background color.
@spec handle_19(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, term(), Raxol.Terminal.Emulator.t()}
Handles OSC 19 command to set/query selection foreground color.
@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.
@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.
@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.
@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.
@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.