Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork639
Color Format Specification
Carter Li edited this pageJul 23, 2025 ·7 revisions
A color encoding in ANSI escape sequence format. It will be inserted between "ESC[" and "m".For more information about ANSI escape codes, visit:https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
35 # Magenta38;5;38 # 38th color in the ANSI 256 color palette4;92 # Bright green with underline5;104 # Blinking text on a blue background (terminal support varies)38;2;255;0;0 # RGB red (255,0,0)1;38;5;220 # Bold orange (ANSI 256 color)ANSI named colors are also supported:
magenta # Equivalent to `35`underline_bright_green # Equivalent to `4;92`bold_red # Equivalent to `1;31`bg_blue # Equivalent to `44` (blue background)- Supported named colors:
black,red,green,yellow,blue,magenta,cyan,white,default - Supported named prefixes:
reset_,bright_,dim_,italic_,underline_,blink_,inverse_,hidden_,strike_,light_
#RRGGBB or #RGB (v2.42.0)
#FF0000 # Equivalent to `38:2;255;0;0` (red)#F00 # Same as #FF0000Use{#color_code} (e.g.{#bold_red}) to set color and{#} to reset. Note when using RGB Colors, two#s are required ({##FF0000})
The following special keywords can be used to reference colors set by other options:
{#keys} # Uses the color set by `--color-keys`{#title} # Uses the color set by `--color-title`{#output} # Uses the color set by `--color-output`{#separator} # Uses the color set by `--color-separator`