Terminal-kit support markup on multiple places.
Markup are special sequences starting with a caret ^ inserted directly inside the text content, that are parsed to produce text-styling.
For example, the string "This is ^Ggreen^ and this is ^Rred^ !" would output the word 'green' in green and 'red' in red,
when passed to most Terminal-kit functions.
Regular markup consists only of two chars, first the caret ^, then any char listed below.
Complex markup is used to lift the single character limitation, it starts with ^[ followed by the command, and ends with ].
For example, the string "This is ^[green]green^ and this is ^[red]red^ !" would output the word 'green' in green and 'red' in red,
when passed to most Terminal-kit functions.
Complex markup supports the key:value format, the previous markup is equivalent to: "This is ^[fg:green]green^ and this is ^[fg:red]red^ !".
In that example, fg was for ForeGround color, in the same vein bg can be used to set up the BackGround color: "This is ^[bg:green]green^ and this is ^[bg:red]red^ !".
If the terminal support true color, you can use hexadecimal color code (# followed by 3 or 6 hexadecimal characters), e.g.: "This is ^[#f9a]pink^ !".
^^output a single caret^^:style reset (back to the default color/background color/attribute)^syntactic sugar: style reset and still output a space^;special style reset: it also reset attribute forced by a document-model's widget^#shift, the next markup will use the background list
^-set the dim attribute^+set the bold attribute^_set the underline attribute^/set the italic attribute^!set the inverse attribute^kset color to black^rset color to red^gset color to green^yset color to yellow/brown^bset color to blue^mset color to magenta^cset color to cyan^wset color to white^Kset color to gray^Rset color to bright red^Gset color to bright green^Yset color to (bright) yellow^Bset color to bright blue^Mset color to bright magenta^Cset color to bright cyan^Wset color to bright white
^kset background color to black^rset background color to red^gset background color to green^yset background color to yellow/brown^bset background color to blue^mset background color to magenta^cset background color to cyan^wset background color to white^Kset background color to gray^Rset background color to bright red^Gset background color to bright green^Yset background color to (bright) yellow^Bset background color to bright blue^Mset background color to bright magenta^Cset background color to bright cyan^Wset background color to bright white
By keys:
fg(or aliases:fgColor,color,c) set the foreground color, the value can be one of the ANSI color (red, brightRed, etc), it can also be any color declared in a Palette for methods of object supportingPalette, it can be a color-code (e.g.:#aa5577) if both the terminal and the method support true-color.bg(or alias:bgColor) set the background color, the supported values are exactly the same than for foreground color.
Any ANSI color (red, brightRed, etc) or color code (e.g.: #aa5577) will be considered as the value for the foreground color.