xterm_get_colors(3f) - [M_xterm] query xterm(1) colors (LICENSE:MIT)
Synopsis
Description
Options
Returns
See Also
Example
Author
License
function xterm_get_colors(type) result(color)
character(len=*),intent(in) :: type character(len=*) :: color
Get the color of various xterm(1) window attributes.
type which type of color to get
o "bg" , "background" o "fg" , "foreground" o "cr" , "cursor" o "mfg", "mouse_foreground" o "mbg", "mouse_background" o "hc" , "highlight_color" o "tfg", "tektronix_foreground" o "tbg", "textronix_background" o "tcr", "textronix_cursor"
color A string specifying a color. Value is of form "rgb:RR/GG/BB"
showrgb(1) shows known named X11 Windows colors
A sample program:
program demo_xterm_get_colors use M_xterm, only : xterm_get_colors character(len=:),allocatable :: cacheSample output:cache=xterm_get_colors(background) write(*,("BACKGROUND:",a))cache
cache=xterm_get_colors(foreground) write(*,("FOREGROUND:",a))cache
cache=xterm_get_colors(cursor) write(*,("CURSOR :",a))cache
cache=xterm_get_colors(highlight) write(*,("HIGHLIGHT :",a))cache
end program demo_xterm_get_colors
BACKGROUND:rgb:0000/0000/0000 FOREGROUND:rgb:ffff/ffff/ffff CURSOR :rgb:ffff/0000/0000 HIGHLIGHT :rgb:ffff/0000/0000
John S. Urban
Nemo Release 3.1 | xterm_get_colors (3) | February 23, 2025 |