-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
24-bit color RGB escape sequences are also sometimes referred to as "TrueColor"
Example use case: Sometimes logfiles use 24bit RGB color escape sequences to make it easy to identify different entities at a glance e.g. assign different email addresses to different RGB values using a checksum.
...or sometimes people just like to do crazy terminal hacks, e.g:
convert -thumbnail "$(tput cols)" "$image" txt:- |
awk -F '[)(,:]' '/white/{$9=$10=$11=255}!/^#/{if($2%2){printf"\033[48;2;"pR[$1]";"pG[$1]";"pB[$1]";38;2;"$9";"$10";"$11"m▄"}else{pR[$1]=$9;pG[$1]=$10;pB[$1]=$11}}'
tput sgr0Either way, supporting the entire RGB color space would be useful. 🙁
The escape sequences used by almost all terminals with 24-bit RGB support are:
ESC[38;2;⟨r⟩;⟨g⟩;⟨b⟩m => Select RGB foreground color
ESC[48;2;⟨r⟩;⟨g⟩;⟨b⟩m => Select RGB background color
E.g. see infocmp tmux-direct | grep seta
xpl, ian-h-chamberlain and marcoffee
Metadata
Metadata
Assignees
Labels
No labels