Change/Read palette color
Parses text
as ';' separated list. For each pair of items (color
, str
):
color
as index into the palette (possibly with special indexes following the proper palette). If str
is '?' then this is a readback command, otherwise: parse str
as color (via XParseColor traditionally) and set the palette entry color
to that color.If readback was requested responds with a sequence of the same form that would set the current color. E.g. ESC]4;1;rgb:ffff/ffff/0000ESC\
Some terminals implement further colors after the proper palette that are reachable with this sequence. See set attribute replacement colors for details.
color formats of XParseColor:
🛈 Accepts a [a]
prefix to color names where a
is the alpha of the color (0=fully transparent, 100=fully opaque)
🛈 Accepts rgba:r/g/b/a
color format. Each component uses exactly 4 hex digits. a = ffff is fully opaque.
🛈 Uses XParseColor for other formats.
🛈 readback uses rgb:%04x/%04x/%04x
or when transparent rgba:%04x/%04x/%04x/%04x
🛈 Uses XParseColor for color formats.
🛈 readback can be disabled by configuration.
🛈 readback uses rgb:%04x/%04x/%04x
🛈 Additional color values 'XtDefaultForeground' and 'XtDefaultBackground' are available.
🛈 only supports color names and rgb colors.
🛆 #rgb style sequences are scaled instead of shifted when not using full 4 hex digits per color.
🛆 rgb:r/g/b format only supports using the same number of digits for all components.
🛈 readback uses rgb:%04x/%04x/%04x
iterm2: Index -1 and -2 are used for default foreground and background color. https://iterm2.com/documentation-escape-codes.html