Set the background to one of the sixteen named colours.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | color |
One of the ANSI_* colour constants, 0 to 15. |
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