bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix linux color-change sequence


From: Thomas Dickey
Subject: Re: [PATCH] Fix linux color-change sequence
Date: Sat, 17 Dec 2016 12:14:55 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Dec 16, 2016 at 03:19:19AM +0500, Mihail Konev wrote:
> ---
> 'tput 12 15 16 17' now outputs '\e]Pc0f1011'
> (before it was '\e]Pc030404')

The latter (scaling) appears to be as documented (man init_color):

       The init_color routine changes the definition of  a  color.   It  takes
       four arguments: the number of the color to be changed followed by three
       RGB values (for the amounts of red, green, and blue  components).   The
       value  of  the  first  argument must be between 0 and COLORS.  (See the
       section Colors for the default color index.)  Each of  the  last  three
       arguments must be a value between 0 and 1000.  When init_color is used,
       all occurrences of that color on the screen immediately change  to  the
       new definition.

and X/Open agrees with that:

http://pubs.opengroup.org/onlinepubs/7908799/xcurses/can_change_color.html

        For both functions, the color argument must be in the range from 0 to
        and including COLORS-1.  Valid intensity values range from 0 (no
        intensity component) up to and including 1000 (maximum intensity in
        that component). 

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]