ansi_bg_256 Function

public pure function ansi_bg_256(index) result(seq)

Set the background from the 256-colour cube.

Arguments

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

Palette index, clamped to 0 to 255.

Return Value character(len=:), allocatable


Calls

proc~~ansi_bg_256~~CallsGraph proc~ansi_bg_256 ansi_bg_256 interface~to_string to_string proc~ansi_bg_256->interface~to_string proc~clamp_byte clamp_byte proc~ansi_bg_256->proc~clamp_byte

Source Code

   pure function ansi_bg_256(index) result(seq)
      !! Set the background from the 256-colour cube.
      integer(int32), intent(in) :: index
         !! Palette index, clamped to 0 to 255.
      character(len=:), allocatable :: seq

      seq = CSI//"48;5;"//to_string(clamp_byte(index))//"m"
   end function ansi_bg_256