[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash colour codes
From: |
Koichi Murase |
Subject: |
Re: Bash colour codes |
Date: |
Sat, 17 Apr 2021 07:33:16 +0900 |
2021年4月17日(土) 7:12 <pauline-galea@gmx.com>:
> Is the following format correct?
>
> \e[48;5;200;100;50;38;5;50;100;200m
No. 5 is for indexed colors. Use 2 for RGB colors. It depends on the
terminal, but usually
\e[48;2;$bgR;$bgG;$bgB;38;2;$fgR;$fgG;${fgR}m
will work mostly. Some terminals support
\e[48:2:$bgR:$bgG:$bgB;38:2:$fgR:$fgG:${fgR}m
Some other terminals support
\e[48:2::$bgR:$bgG:$bgB;38:2::$fgR:$fgG:${fgR}m
which was originally specified in ISO 8613-6. Your terminal Terminator
seems to support all of these versions.
--
Koichi