X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_color.3x.html;h=e693b553442454c4c831ded10ca4a0f577b6471d;hb=d1a029866f6d84087781eaa81de19949d8533426;hp=aae55777af4e6a20f955456cbe4f5c7c6b9f6500;hpb=7884aa084f9440fd964f14fe31853a5f85db5104;p=ncurses.git diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html index aae55777..e693b553 100644 --- a/doc/html/man/curs_color.3x.html +++ b/doc/html/man/curs_color.3x.html @@ -1,6 +1,6 @@ -
--curs_color(3x) curs_color(3x) +curs_color(3x) Library calls curs_color(3x) @@ -135,8 +135,8 @@ o If the parameter passed to waddch is not blank, or it does not use the special color pair 0, curses prefers the color pair from the - parameter, if it is nonzero. Otherwise, it tries the window at- - tribute next, and finally the background character. + parameter, if it is nonzero. Otherwise, it tries the window attri- + bute next, and finally the background character. Some curses functions such as wprintw call waddch. Those do not com- bine its parameter with a color pair. Consequently those calls use on- @@ -439,7 +439,59 @@ o Color RGB values are not settable. +
+ SVr3.2 introduced color support to curses in 1987. + + SVr4 made internal changes, e.g., moving the storage for the color + state from SP (the SCREEN structure) to cur_term (the TERMINAL struc- + ture), but provided the same set of library functions. + + SVr4 curses limits the number of color pairs to 64, reserving color + pair zero (0) as the terminal's initial uncolored state. This limit + arises because the color pair information is a bitfield in the chtype + data type (denoted by A_COLOR). + + Other implementations of curses had different limits: + + o PCCurses (1987-1990) provided for only eight (8) colors. + + o PDCurses (1992-present) inherited the 8-color limitation from PC- + Curses, but changed this to 256 in version 2.5 (2001), along with + changing chtype from 16-bits to 32-bits. + + o X/Open Curses (1992-present) added a new structure cchar_t to store + the character, attributes and color-pair values, allowing increased + range of color-pairs. Both color-pairs and color-values used a + signed short, limiting values to 15 bits. + + o ncurses (1992-present) uses eight bits for A_COLOR in chtype val- + ues. + + Version 5.3 provided a wide-character interface (2002), but left + color-pairs as part of the attributes-field. + + Since version 6 (2015), ncurses uses a separate int for color-pairs + in the cchar_t values. When those color-pair values fit in 8 bits, + ncurses allows color-pairs to be manipulated via the functions us- + ing chtype values. + + o NetBSD curses used 6 bits from 2000 (when colors were first sup- + ported) until 2004. At that point, NetBSD changed to use 10 bits. + As of 2021, that size is unchanged. Like ncurses before version 6, + the NetBSD color-pair information is stored in the attributes field + of cchar_t, limiting the number of color-pairs by the size of the + bitfield. + +
+ +
+ The functions marked as extensions were designed for ncurses(3x), and + are not found in SVr4 curses, 4.4BSD curses, or any other previous ver- + sion of curses. + + +
This implementation satisfies XSI Curses's minimum maximums for COLORS and COLOR_PAIRS. @@ -472,7 +524,7 @@ - curs_color(3x) +ncurses 6.4 2023-07-01 curs_color(3x)