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

From: Mitchell <m.att.foicica.com>
Date: Tue, 2 Apr 2013 10:32:54 -0400 (Eastern Daylight Time)

Hi Pete,

On Tue, 2 Apr 2013, Peter Kazmier wrote:

> On Apr 2, 2013, at 12:57 AM, Mitchell <m.att.foicica.com> 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.

There is no color map to colors 8-15. In lexer.lua, you set the "bold"
style attribute in tandem with one of the 8 recognized colors as the
"fore" attribute to use colors 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.

Scinterm[1] is responsible for the ncurses interface.

Cheers,
Mitchell

[1]: http://foicica.com/scinterm

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 02 Apr 2013 - 10:32:54 EDT

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