ansi_bg Function

public pure function ansi_bg(color) result(seq)

Set the background to one of the sixteen named colours.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: color

One of the ANSI_* colour constants, 0 to 15.

Return Value character(len=:), allocatable


Calls

proc~~ansi_bg~~CallsGraph proc~ansi_bg ansi_bg interface~to_string to_string proc~ansi_bg->interface~to_string proc~base_code base_code proc~ansi_bg->proc~base_code

Called by

proc~~ansi_bg~~CalledByGraph proc~ansi_bg ansi_bg proc~styled styled proc~styled->proc~ansi_bg

Source Code

   pure function ansi_bg(color) result(seq)
      !! Set the background to one of the sixteen named colours.
      integer(int32), intent(in) :: color
         !! One of the ANSI_* colour constants, 0 to 15.
      character(len=:), allocatable :: seq

      seq = CSI//to_string(base_code(color, 40_int32))//"m"
   end function ansi_bg