mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-11 14:30:24 +02:00
termcolor: permit hex colors
This commit adds support for specifying Ansi256 or RGB colors using hexadecimal notation.
This commit is contained in:
@ -696,13 +696,18 @@ the background color for line numbers to yellow:
|
||||
|
||||
Extended colors can be used for {value} when the terminal supports ANSI color
|
||||
sequences. These are specified as either 'x' (256-color) or 'x,x,x' (24-bit
|
||||
truecolor) where x is a number between 0 and 255 inclusive.
|
||||
truecolor) where x is a number between 0 and 255 inclusive. x may be given as
|
||||
a normal decimal number or a hexadecimal number, which is prefixed by `0x`.
|
||||
|
||||
For example, the following command will change the match background color to
|
||||
that represented by the rgb value (0,128,255):
|
||||
|
||||
rg --colors 'match:bg:0,128,255'
|
||||
|
||||
or, equivalently,
|
||||
|
||||
rg --colors 'match:bg:0x0,0x80,0xFF'
|
||||
|
||||
Note that the the intense and nointense style flags will have no effect when
|
||||
used alongside these extended color codes.
|
||||
");
|
||||
|
Reference in New Issue
Block a user