Re: [code] [textadept] How to set "bright" ansi colors as background color in curses mode?

From: Peter Kazmier <>
Date: Tue, 2 Apr 2013 07:29:47 -0500

On Apr 2, 2013, at 12:57 AM, Mitchell <> wrote:
> This is tricky. Only 64 color pairs can be defined at once (using the 8 basic colors), e.g. White-Black, Red-Black, Green-Black, etc. So combinations like White-Black|Bold are not possible, at least for background colors. (However, a combination like White|Bold-Black is perfectly legitimate and does not count as a pair due to the current implementation.) The only way to get around this is, in your terminal application, to define Black as your "Bright Black" and Black|Bold as your "Normal Black", which may seem counter intuitive.

After looking into this more, I think I understand it a bit better. Ncurses does support 16-color terminals. When setting colors, they are assigned 0-15. I'm trying to figure out how to set colors 8-15.

Forget the extra 8 colors, doesn't something have to convert the rgb values in the 'term' theme to one of the 0-7 colors supported by the terminal? Where would that mapping happen? I'm hoping to see if I can find what rgb values would map to 8-15.

> On a side note, changing color definitions in Textadept is done in themes[1]. See themes/term/lexer.lua.

Yes, I've been looking at them in depth :-) I was more curious as to what part of the code actually interfaced with ncurses.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 02 Apr 2013 - 08:29:47 EDT

This archive was generated by hypermail 2.2.0 : Wed 03 Apr 2013 - 06:38:37 EDT