C Library Functions  - xterm_get_colors (3)

NAME

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

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

    MIT


Nemo Release 3.1 xterm_get_colors (3) February 23, 2025
Generated by manServer 1.08 from 5b3db256-8b52-4b4c-a556-046ad7c3f83e using man macros.