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

From: Robert <rob.g.att.web.de>
Date: Mon, 10 Jun 2013 09:20:05 +0200

Hi,

what is the current state of setting colors in themes for the curses version?
The manual states:
"Note: The only colors that the terminal version of Textadept
recognizes are the standard black, red, green, yellow, blue, magenta,
cyan, white, and bold variants of those colors. Your terminal
emulatorís settings determine how to display these standard colors."
Setting a color like for the regular themes displays a different color
for me, e.g.
property['color.black'] = 0x362b00
(a 'solarized' background color) displays as light gray.

Since Pete posted a curses screenshot this should be possible, shouldn't it?

In case it matters, my term setting:
$ echo $TERM
xterm-256color

Another question,
the default comment styling, bold black, is unreadable in this setup,
also in the default Ubuntu terminal.
Maybe this could be changed to yellow or something (if required for 8
color terminals) or light_black (if possible)?

Robert

On Sat, Apr 6, 2013 at 6:45 PM, Pete Kazmier <pete.att.kazmier.com> wrote:
> Looks good. I just tested my theme out with your changes ... Thanks!
>
>
> On Sat, Apr 6, 2013 at 11:15 AM, Pete Kazmier <pete.att.kazmier.com> wrote:
>>
>> Cool. I'll test this weekend. One question re the code, in your 'for'
>> loop, why the test of '<=' vs '<'. Even in the original code, I had noticed
>> this, but with a 0-based index, shouldn't this be '<'?
>>
>> Did you get to take a look at the keybinding stuff I worked on last week?
>> I thought you might like the functionality.
>>
>> Btw, last night I watched your talk on textadept at lua confirm 2012. Well
>> done. You speak extremely well. As a Lua newbie, I came across Lpeg, which
>> then led me to your textadept. I've always been fond of programmable editors
>> (huge emacs fan), so textadept immediately appealed to me, in particular,
>> the ncurses version.
>>
>> Sent from Pete's iPad
>>
>> On Apr 6, 2013, at 10:50 AM, Mitchell <m.att.foicica.com> wrote:
>>
>> > Hi Peter,
>> >
>> > On Wed, 3 Apr 2013, Peter Kazmier wrote:
>> >
>> >> Hi Mitchell,
>> >>
>> >> On Apr 2, 2013, at 10:36 PM, Mitchell <m.att.foicica.com> 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:
>> >>
>> >> http://www.kazmier.com/~kaz/textadept2.png
>> >
>> > 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.)
>> >
>> > Cheers,
>> > Mitchell
>> >
>> > [1]: http://foicica.com/hg/scinterm/rev/b866b0c05029
>> > --
>> > 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.
>> >
>
>

-- 
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 Mon 10 Jun 2013 - 03:20:05 EDT

This archive was generated by hypermail 2.2.0 : Mon 10 Jun 2013 - 06:52:16 EDT