requestColorPalette static method

Cmd requestColorPalette(
  1. int index
)

Requests a color from the terminal palette.

This sends OSC 4 ; index ; ? to the terminal. The terminal will respond with an OSC 4 sequence which is decoded into a ColorPaletteMsg.

Implementation

static Cmd requestColorPalette(int index) =>
    Cmd(() async => WriteRawMsg('\x1b]4;$index;?\x07'));