Skip to content

Commit

Permalink
texinfo: update 'display colors' info
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-naumov committed Sep 29, 2024
1 parent 9cb14ce commit 7d93c07
Showing 1 changed file with 27 additions and 33 deletions.
60 changes: 27 additions & 33 deletions src/doc/screen.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -5633,66 +5633,60 @@ standout
@item B
blinking
@end table
Colors are coded either as a hexadecimal number or two letters specifying
the desired background and foreground color (in that order). The following
colors are known:
The old format of specifying colors by letters (k,r,g,y,b,m,c,w) is
now deprecated. Colors are coded as 0-7 for basic ANSI, 0-255 for 256
color mode, or for truecolor, either a hexadecimal code starting with
x, or HTML notation as either 3 or 6 hexadecimal digits.
Foreground and background are specified by putting a semicolon between
them.
Ex: @code{#FFF;#000} or @code{i7;0} is white on a black background.

The following numbers are for basic ANSI:

@table @code
@item k
@item 0
black
@item r
@item 1
red
@item g
@item 2
green
@item y
@item 3
yellow
@item b
@item 4
blue
@item m
@item 5
magenta
@item c
@item 6
cyan
@item w
@item 7
white
@item d
default color
@item .
leave color unchanged
@end table
The capitalized versions of the letter specify bright colors. You can also
use the pseudo-color @samp{i} to set just the brightness and leave the color
unchanged.

A one digit/letter color description is treated as foreground or
background color dependent on the current attributes: if reverse mode is
set, the background color is changed instead of the foreground color.
If you don't like this, prefix the color with a @samp{.}. If you want
the same behavior for two-letter color descriptions, also prefix them
with a @samp{.}.
You can also use the pseudo-color 'i' to set just the brightness
and leave the color unchanged.

As a special case, @samp{%@{-@}} restores the attributes and colors that
were set before the last change was made (i.e. pops one level of the
color-change stack).

@noindent
Examples:
@table @samp
@item G
@item 12
set color to bright green
@item +b r
use bold red
@item = yd
clear all attributes, write in default color on yellow background.
@item %-Lw%@{= BW@}%50>%n%f* %t%@{-@}%+Lw%<
The available windows centered at the current win dow and truncated to
the available width. The current window is displayed white on blue.
@item #F00;FFA
write in bright red color on a pale yellow background
@item %-Lw%@{#AAA;#006@}%50>%n%f* %t%@{-@}%+Lw%<
The available windows centered at the current window and truncated
to the available width. The current window is displayed white on blue.
This can be used with @samp{hardstatus alwayslastline}.
@item %?%F%@{.R.@}%?%3n %t%? [%h]%?
@item %?%F%@{;2@}%?%3n %t%? [%h]%?
The window number and title and the window's hardstatus, if one is set.
Also use a red background if this is the active focus.
Useful for @samp{caption string}.
@end table


@node Environment, Files, String Escapes, Top
@chapter Environment Variables
@cindex environment
Expand Down

0 comments on commit 7d93c07

Please sign in to comment.