Raxol.Terminal.Commands.OSCHandlers.ColorPalette (Raxol v0.5.0)
View SourceHandles OSC 4 (Color Palette Set/Query) commands.
This handler manages the terminal's color palette, allowing dynamic modification of colors during runtime.
Color Formats Supported
- rgb:RRRR/GGGG/BBBB (hex, 1-4 digits per component)
- #RRGGBB (hex, 2 digits per component)
- #RGB (hex, 1 digit per component)
- rgb(r,g,b) (decimal, 0-255)
- rgb(r%,g%,b%) (percentage, 0-100%)
Summary
Functions
Handles OSC 4 commands for color palette management.
Functions
@spec handle_4(Raxol.Terminal.Emulator.t(), String.t()) :: {:ok, Raxol.Terminal.Emulator.t()} | {:error, term(), Raxol.Terminal.Emulator.t()}
Handles OSC 4 commands for color palette management.
Commands
4;c;spec
- Set color c to spec4;c;?
- Query color c
Where:
- c is the color index (0-255)
- spec is the color specification