[neomutt-devel] Colours, LOTS of colours

Richard Russon rich at flatcap.org
Thu May 4 16:01:27 CEST 2023


Hi all,

I'd like to announce a new feature: Direct Colour (aka True Colour).
Thanks to Rayford Shireman (@rayfordshire) for creating it!

Before, NeoMutt was limited to a 256 colour palette.
With direct colour, you can choose from 2^24 (16,777,216) colours.

This will be in the next release.

# Building NeoMutt

First, you'll need to build NeoMutt with ncurses >= 6.1
(that shouldn't be a problem, it came out in 2018)

Ncurses also needs to have been compiled with extended colors enabled.
In recent versions of ncurses, this is the default.
Check by grepping `NCURSES_EXT_COLORS` in `ncurses.h`

Next, you need your terminal to be prepared:

  export TERM=xterm-direct

Now, run NeoMutt and check that it's enabled:

  :set color_directcolor?

If it says, 'no', then your terminal might not be able to handle it.

Now you're ready to start using the colours.

# Configuring NeoMutt

NeoMutt's colours can be configured in three ways:

- Name: "black", "brightred", etc
- Palette: "color123", "color207"
- RGB format: "#12ab56" (new!)

color status #ffffff #ff8080
color index  #80c000 #007890 apple

Note: The rules for commenting using "#" have been relaxed for `color` commands
      so that you don't need to quote #123456 style colours.

# Limitations

You can select ANY colours you like using the `#RRGGBB` syntax,
but colours selected using `red` or `color123` might appear different to expected.

Most terminals allow you to configure the first 16 colours to create custom
palettes.  Some even allow you to configure all 256 colours.

Normal NeoMutt would allow you to use these colours using:

  color0 ... color255

NeoMutt isn't able to determine what these palette colours are.
When directcolor is enabled, NeoMutt has to convert `color123` into RGB using a
"standard" palette.

Cheers,
    FlatCap / Rich
Reply-To:


Hi all,

I'd like to announce a new feature: Direct Colour (aka True Colour).
Thanks to Rayford Shireman (@rayfordshire) for creating it!

Before, NeoMutt was limited to a 256 colour palette.
With direct colour, you can choose from 2^24 (16,777,216) colours.

This will be in the next release.

# Building NeoMutt

First, you'll need to build NeoMutt with ncurses >= 6.1
(that shouldn't be a problem, it came out in 2018)

Ncurses also needs to have been compiled with extended colors enabled.
In recent versions of ncurses, this is the default.
Check by grepping `NCURSES_EXT_COLORS` in `ncurses.h`

Next, you need your terminal to be prepared:

  export TERM=xterm-direct

Now, run NeoMutt and check that it's enabled:

  :set color_directcolor?

If it says, 'no', then your terminal might not be able to handle it.

Now you're ready to start using the colours.

# Configuring NeoMutt

NeoMutt's colours can be configured in three ways:

- Name: "black", "brightred", etc
- Palette: "color123", "color207"
- RGB format: "#12ab56" (new!)

color status #ffffff #ff8080
color index  #80c000 #007890 apple

Note: The rules for commenting using "#" have been relaxed for `color` commands
      so that you don't need to quote #123456 style colours.

# Limitations

You can select ANY colours you like using the `#RRGGBB` syntax,
but colours selected using `red` or `color123` might appear different to expected.

Most terminals allow you to configure the first 16 colours to create custom
palettes.  Some even allow you to configure all 256 colours.

Normal NeoMutt would allow you to use these colours using:

  color0 ... color255

NeoMutt isn't able to determine what these palette colours are.
When directcolor is enabled, NeoMutt has to convert `color123` into RGB using a
"standard" palette.

Cheers,
    FlatCap / Rich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20230504/5063b67d/attachment.sig>


More information about the neomutt-devel mailing list