Raxol.Core.Terminal.OSC.Handlers.ColorPalette (Raxol v0.3.0)

View Source

Handles 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

handle(arg, state)

Handles OSC 4 commands for color palette management.

Commands

  • 4;c;spec - Set color c to spec
  • 4;c;? - Query color c

Where:

  • c is the color index (0-255)
  • spec is the color specification