add ANSI color codes to a string
AnsiColorString( s, foreground=fgcolor, background=bgcolor)
string - the string to be formatted
color format recognized by ColorTools, default "White"
color format recognized by ColorTools, default "Black"
This routine adds the ANSI escape codes to the input string so that it will be displayed with the specified foreground and background colors in environments that support ANSI escape codes. This is meant for use with the command line interface version of Maple where the escape codes will not be printed, even if they are not properly supported.
The standard user interface of Maple does not support ANSI escape codes and returned strings will have the ANSI escape codes visible in them.
The output of this command will be full of weird character in the Maple standard user interface, but should be displayed in the given colors in command-line Maple used in a terminal that supports ANSI colors.
The ColorTools[AnsiColorString] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)