Colour Names and Attributes#
Colour Specification#
Objects in NeoMutt must be given both a foreground and background colour (it is not possible to specify one or the other). Note that default can be used as a transparent colour (see below).
Colours can be specified in three ways:
Method |
Example |
Description |
|---|---|---|
Name |
|
Use the colour’s name |
Palette number |
|
Use the colour’s number in the 256 Xterm colour palette |
Hexadecimal RGB |
|
Use |
Regex-Matched and Pattern-Matched Objects#
Some colour objects require a regex or NeoMutt pattern as an additional argument (see Command Syntax below). These objects colour only the parts of the display that match the given expression.
Object |
Match type |
Applies to |
|---|---|---|
|
regex |
Email body text |
|
regex |
Email header lines |
|
pattern |
Entire index line |
|
pattern |
Author fields ( |
|
pattern |
Collapsed thread count ( |
|
pattern |
Date field |
|
pattern |
Flags ( |
|
pattern |
Label ( |
|
pattern |
Message number ( |
|
pattern |
Size ( |
|
pattern |
Subject ( |
|
pattern |
Tag name ( |
|
pattern |
Transformed tags ( |
|
regex |
Status bar text |
Colour Names#
The following named colours are available for foreground and background:
Colour |
|---|
|
|
|
|
|
|
|
|
|
Colour Modifiers#
Named colours may be prefixed by a modifier:
Modifier |
Effect |
Example |
|---|---|---|
|
Make the colour boldfaced or light |
|
|
Make a blinking/alert colour |
|
The precise behavior depends on the terminal and its configuration. The boldfaced/light difference and such background colours may be available only for terminals configured with at least 16 colours.
The default Colour#
If your terminal supports it, the special keyword default can be used as a transparent colour.
In this case default can be used to only set the foreground or background colour individually:
# Make error messages white text on a red background
color error default red
color error white default
Attributes#
In addition to colours, objects may have their attributes set:
Attribute |
|---|
|
|
|
|
|
|
Simple Colour Objects#
These are general NeoMutt objects that can be coloured:
Object |
Description |
|---|---|
|
Colour for attachment headers |
|
Highlighting bold patterns in the body of messages |
|
Error messages printed by NeoMutt |
|
Default colour of the message header in the pager |
|
Arrow or bar used to indicate the current item in a menu |
|
The |
|
Informational messages |
|
Default colour for all text |
|
The key letters in multi-choice questions |
|
Visual progress bar |
|
A question |
|
Highlighting of words in the pager |
|
Email’s signature lines (.sig) |
|
The |
|
Thread tree drawn in the message index and attachment menu |
|
Highlighting underlined patterns in the body of messages |
|
Warning messages |
Compose Colour Objects#
Object |
Description |
|---|---|
|
Header labels, e.g. |
|
Mail will be encrypted |
|
Mail will be signed |
|
Mail will be encrypted and signed |
|
Mail will not be encrypted or signed |
Quoted Email Colours#
The quoted email colours don’t use a pattern. The first colour, quoted, provides a default colour for all quoted text.
Each different level of quoting can be given a different colour using quoted1 through quoted9.
Object |
Description |
|---|---|
|
Text matching |
|
1 level deeper quoted text, e.g. |
|
2 level deeper quoted text, e.g. |
… |
… |
|
9 level deeper quoted text |
Command Syntax#
color object [attribute ...] foreground background
color {header | body} [attribute ...] foreground background regex
color index [attribute ...] foreground background [pattern]
color status [attribute ...] foreground background [regex [num]]
uncolor object
uncolor {index | header | body} {* | pattern [...]}
uncolor status {* | regex [...]}
ANSI Escape Sequences#
NeoMutt’s pager recognises ANSI escape sequences embedded in message text and renders them as colour and attribute changes.
Sequences use the format ESC[Ps;Ps;...m (e.g., \e[1;32m for bold green, \e[0m to reset).
Set Attributes#
Code |
Effect |
|---|---|
|
Normal (reset all attributes and colours) |
|
Bold |
|
Italic |
|
Underline |
|
Blink |
|
Reverse video |
Clear Attributes#
Code |
Effect |
|---|---|
|
Clear bold |
|
Clear italic |
|
Clear underline |
|
Clear blink |
|
Clear reverse video |
Foreground Colours#
Code |
Effect |
|---|---|
|
Basic foreground colours (black, red, green, yellow, blue, magenta, cyan, white) |
|
256-colour palette foreground ( |
|
True colour (24-bit RGB) foreground |
|
Default foreground colour |
Background Colours#
Code |
Effect |
|---|---|
|
Basic background colours (same order as foreground) |
|
256-colour palette background ( |
|
True colour (24-bit RGB) background |
|
Default background colour |