[UP]


Manual Reference Pages  - xterm_get_colors (3)

NAME

xterm_get_colors(3f) - [M_xterm] query xterm(1) colors (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Returns
See Also
Example
Author
License

SYNOPSIS

function xterm_get_colors(type) result(color) character(len=*),intent(in) :: type
character(len=*)
  :: color

DESCRIPTION

Get the color of various xterm(1) window attributes.

OPTIONS

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"

RETURNS

color
  A string specifying a color. Value is of form "rgb:RR/GG/BB"

SEE ALSO

showrgb(1) shows known named X11 Windows colors

EXAMPLE

A sample program:

   program demo_xterm_get_colors
   use M_xterm, only : xterm_get_colors
   character(len=:),allocatable :: cache

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

Sample output:

   BACKGROUND:rgb:0000/0000/0000
   FOREGROUND:rgb:ffff/ffff/ffff
   CURSOR    :rgb:ffff/0000/0000
   HIGHLIGHT :rgb:ffff/0000/0000

AUTHOR

John S. Urban

LICENSE

Public Domain


xterm_get_colors (3) March 11, 2021
Generated by manServer 1.08 from 38156008-35da-44c8-b8c4-4532fc8462f6 using man macros.