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

From: Mitchell <>
Date: Sat, 6 Apr 2013 11:50:03 -0400 (EDT)

Hi Peter,

On Wed, 3 Apr 2013, Peter Kazmier wrote:

> Hi Mitchell,
> On Apr 2, 2013, at 10:36 PM, Mitchell <> wrote:
>>> Now all I need to do is figure out what is mucking with the background of all my characters. Any quick ideas? Maybe I need to check view.lua and buffer.lua in the theme directory too. I realized I have not done that.
>> Your solution is very clever. I tried something very similar last night when investigating the problem, but gave up when my terminal's COLOR_PAIRS was only 64, not 256 like yours. The only thing I can think of is that BRBLACK might not be 8 in your terminal. Perhaps debugging in ScintillaTerm::DrawTextNoClip() will help you determine what term_color_pair(fore, back) is returning.
> I figured it out ... I needed to redefine your SCI_COLOR_PAIR macro to return a unique value between the range of 1 and 256 with the expanded color set:
> #define SCI_COLOR_PAIR(f, b) ((b) * 16 + (f) + 1)
> With that, it's working great. Now I can tune my terminal solarized theme to my heart's content! I'm not sure how best to incorporate the code into your codebase as I imagine you'd want to test to see if a terminal has 8 or 16 color support.
> Here is a screenshot with everything working correctly:

Thanks for your help! Scinterm now supports this[1]. Please test with your
theme to make sure it works as expected and this will be in the next
release. (Note: I've updated the color definitions.)



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sat 06 Apr 2013 - 11:50:03 EDT

This archive was generated by hypermail 2.2.0 : Sun 07 Apr 2013 - 06:30:15 EDT