FACE, Fortran Ansi Colors Environment.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | ASCII | = | selected_char_kind('default') |
ASCII character set kind. |
integer, | public, | parameter | :: | UCS4 | = | selected_char_kind('default') |
Unicode character set kind. |
character(len=26), | private, | parameter | :: | UPPER_ALPHABET | = | 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
Upper case alphabet. |
character(len=26), | private, | parameter | :: | LOWER_ALPHABET | = | 'abcdefghijklmnopqrstuvwxyz' |
Lower case alphabet. |
character(len=1), | private, | parameter | :: | NL | = | new_line('a') |
New line character. |
character(len=1), | private, | parameter | :: | ESCAPE | = | achar(27) |
“" character. |
character(len=2), | private, | parameter | :: | CODE_START | = | ESCAPE//'[' |
Start ansi code, “[“. |
character(len=1), | private, | parameter | :: | CODE_END | = | 'm' |
End ansi code, “m”. |
character(len=4), | private, | parameter | :: | CODE_CLEAR | = | CODE_START//'0'//CODE_END |
Clear all styles, “[0m”. |
character(len=17), | private, | parameter | :: | STYLES(1:2,1:16) | = | reshape(['BOLD_ON ', '1 ', 'ITALICS_ON ', '3 ', 'UNDERLINE_ON ', '4 ', 'INVERSE_ON ', '7 ', 'STRIKETHROUGH_ON ', '9 ', 'BOLD_OFF ', '22 ', 'ITALICS_OFF ', '23 ', 'UNDERLINE_OFF ', '24 ', 'INVERSE_OFF ', '27 ', 'STRIKETHROUGH_OFF', '29 ', 'FRAMED_ON ', '51 ', 'ENCIRCLED_ON ', '52 ', 'OVERLINED_ON ', '53 ', 'FRAMED_OFF ', '54 ', 'ENCIRCLED_OFF ', '54 ', 'OVERLINED_OFF ', '55 '], [2, 16]) |
Styles. |
character(len=15), | private, | parameter | :: | COLORS_FG(1:2,1:17) | = | reshape(['BLACK ', '30 ', 'RED ', '31 ', 'GREEN ', '32 ', 'YELLOW ', '33 ', 'BLUE ', '34 ', 'MAGENTA ', '35 ', 'CYAN ', '36 ', 'WHITE ', '37 ', 'DEFAULT ', '39 ', 'BLACK_INTENSE ', '90 ', 'RED_INTENSE ', '91 ', 'GREEN_INTENSE ', '92 ', 'YELLOW_INTENSE ', '93 ', 'BLUE_INTENSE ', '94 ', 'MAGENTA_INTENSE', '95 ', 'CYAN_INTENSE ', '96 ', 'WHITE_INTENSE ', '97 '], [2, 17]) |
Foreground colors. |
character(len=15), | private, | parameter | :: | COLORS_BG(1:2,1:17) | = | reshape(['BLACK ', '40 ', 'RED ', '41 ', 'GREEN ', '42 ', 'YELLOW ', '43 ', 'BLUE ', '44 ', 'MAGENTA ', '45 ', 'CYAN ', '46 ', 'WHITE ', '47 ', 'DEFAULT ', '49 ', 'BLACK_INTENSE ', '100 ', 'RED_INTENSE ', '101 ', 'GREEN_INTENSE ', '102 ', 'YELLOW_INTENSE ', '103 ', 'BLUE_INTENSE ', '104 ', 'MAGENTA_INTENSE', '105 ', 'CYAN_INTENSE ', '106 ', 'WHITE_INTENSE ', '107 '], [2, 17]) |
Background colors. |
Colorize and stylize strings, DEFAULT kind.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Input string. |
||
character(len=*), | intent(in), | optional | :: | color_fg |
Foreground color definition. |
|
character(len=*), | intent(in), | optional | :: | color_bg |
Background color definition. |
|
character(len=*), | intent(in), | optional | :: | style |
Style definition. |
Colorized string.
Colorize and stylize strings, ASCII kind.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=ASCII, len=*), | intent(in) | :: | string |
Input string. |
||
character(len=*), | intent(in), | optional | :: | color_fg |
Foreground color definition. |
|
character(len=*), | intent(in), | optional | :: | color_bg |
Background color definition. |
|
character(len=*), | intent(in), | optional | :: | style |
Style definition. |
Colorized string.
Colorize and stylize strings, DEFAULT kind.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Input string. |
||
character(len=*), | intent(in), | optional | :: | color_fg |
Foreground color definition. |
|
character(len=*), | intent(in), | optional | :: | color_bg |
Background color definition. |
|
character(len=*), | intent(in), | optional | :: | style |
Style definition. |
Colorized string.
Colorize and stylize strings, UCS4 kind.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=UCS4, len=*), | intent(in) | :: | string |
Input string. |
||
character(len=*), | intent(in), | optional | :: | color_fg |
Foreground color definition. |
|
character(len=*), | intent(in), | optional | :: | color_bg |
Background color definition. |
|
character(len=*), | intent(in), | optional | :: | style |
Style definition. |
Colorized string.
Return the array-index corresponding to the queried color.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | color |
Color definition. |
Index into the colors arrays.
Return the array-index corresponding to the queried style.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | style |
Style definition. |
Index into the styles array.
Return a string with all uppercase characters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Input string. |
Upper case string.
Print to standard output all colors samples.
Print to standard output all styles samples.