Terminal color and style escape sequences
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(ansi_code), | public, | parameter | :: | bg_color_black | = | ansi_code(bg=0) | Identifier for black background color |
type(ansi_code), | public, | parameter | :: | bg_color_blue | = | ansi_code(bg=4) | Identifier for blue background color |
type(ansi_code), | public, | parameter | :: | bg_color_cyan | = | ansi_code(bg=6) | Identifier for cyan background color |
type(ansi_code), | public, | parameter | :: | bg_color_default | = | ansi_code(bg=9) | Identifier for the default background color |
type(ansi_code), | public, | parameter | :: | bg_color_green | = | ansi_code(bg=2) | Identifier for green background color |
type(ansi_code), | public, | parameter | :: | bg_color_magenta | = | ansi_code(bg=5) | Identifier for magenta background color |
type(ansi_code), | public, | parameter | :: | bg_color_red | = | ansi_code(bg=1) | Identifier for red background color |
type(ansi_code), | public, | parameter | :: | bg_color_white | = | ansi_code(bg=7) | Identifier for white background color |
type(ansi_code), | public, | parameter | :: | bg_color_yellow | = | ansi_code(bg=3) | Identifier for yellow background color |
type(ansi_code), | public, | parameter | :: | fg_color_black | = | ansi_code(fg=0) | Identifier for black foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_blue | = | ansi_code(fg=4) | Identifier for blue foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_cyan | = | ansi_code(fg=6) | Identifier for cyan foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_default | = | ansi_code(fg=9) | Identifier for the default foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_green | = | ansi_code(fg=2) | Identifier for green foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_magenta | = | ansi_code(fg=5) | Identifier for magenta foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_red | = | ansi_code(fg=1) | Identifier for red foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_white | = | ansi_code(fg=7) | Identifier for white foreground color |
type(ansi_code), | public, | parameter | :: | fg_color_yellow | = | ansi_code(fg=3) | Identifier for yellow foreground color |
type(ansi_code), | public, | parameter | :: | style_blink | = | ansi_code(style=5) | Identifier for blink style |
type(ansi_code), | public, | parameter | :: | style_blink_fast | = | ansi_code(style=6) | Identifier for (fast) blink style |
type(ansi_code), | public, | parameter | :: | style_bold | = | ansi_code(style=1) | Identifier for bold style |
type(ansi_code), | public, | parameter | :: | style_dim | = | ansi_code(style=2) | Identifier for dim style |
type(ansi_code), | public, | parameter | :: | style_hidden | = | ansi_code(style=8) | Identifier for hidden style |
type(ansi_code), | public, | parameter | :: | style_italic | = | ansi_code(style=3) | Identifier for italic style |
type(ansi_code), | public, | parameter | :: | style_reset | = | ansi_code(style=0) | Identifier for reset style |
type(ansi_code), | public, | parameter | :: | style_reverse | = | ansi_code(style=7) | Identifier for reverse style |
type(ansi_code), | public, | parameter | :: | style_strikethrough | = | ansi_code(style=9) | Identifier for strikethrough style |
type(ansi_code), | public, | parameter | :: | style_underline | = | ansi_code(style=4) | Identifier for underline style |
Add two escape sequences, attributes in the right value override the left value ones.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ansi_code), | intent(in) | :: | lval | First escape code |
||
type(ansi_code), | intent(in) | :: | rval | Second escape code |
Combined escape code
Concatenate an escape code with a string and turn it into an actual escape sequence
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | lval | String to add the escape code to |
||
type(ansi_code), | intent(in) | :: | code | Escape sequence |
Concatenated string
Concatenate an escape code with a string and turn it into an actual escape sequence
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(string_type), | intent(in) | :: | lval | String to add the escape code to |
||
type(ansi_code), | intent(in) | :: | code | Escape sequence |
Concatenated string
Concatenate an escape code with a string and turn it into an actual escape sequence
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ansi_code), | intent(in) | :: | code | Escape sequence |
||
character(len=*), | intent(in) | :: | rval | String to add the escape code to |
Concatenated string
Concatenate an escape code with a string and turn it into an actual escape sequence
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ansi_code), | intent(in) | :: | code | Escape sequence |
||
type(string_type), | intent(in) | :: | rval | String to add the escape code to |
Concatenated string
Transform a color code into an actual ANSI escape sequence
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ansi_code), | intent(in) | :: | code | Color code to be used |
ANSI escape sequence representing the color code
Container for terminal escape code