Terminal Guide

Direct Color Background

Set: 48:2:...
Reset: 49
urxvt
xterm
vte
konsole
linuxvc

Set background color as RGB values.

The color is specified as separate values for each color component. Values are in the range 0 to 255 (inclusive). The order is red, green, blue.

This has multiple possible forms.

Attribute
(1)48:2:Ⓝ:Ⓝ:Ⓝ
(2)48:2:Ⓝ:Ⓝ:Ⓝ:Ⓝthe first Ⓝ is supposed to be a color space indication, but is just ignored in practice; additional subparameters are ignored
(3)48;2:Ⓝ:Ⓝ:Ⓝadditional subparameters are ignored
(4)48;2;Ⓝ;Ⓝ;Ⓝ

urxvt ( ✓ )

urxvt supports only form 4.

urxvt uses a set of dynamic color slots and overwrites the least recently used in the proximity of the target color. Real usage should yield much better result than the demonstration color ramps.

xterm ( ✔ )

xterm supports forms 1, 2, 3 and 4.

vte ( ✓ )

vte supports forms 1 and 4. Form 2 is supported when the color space id is empty (defaulted). Any digit in the color space id prevents this form from working (subparameters are still consumed)

konsole ( ✓ )

konsole supports only form 4.

linuxvc ( ✓ )

🛈 linuxvc only supports form 4. 🛆 linuxvc approximates from an 8 color (non bright basic colors) palette using just the high bit of the color components.