Messages Colors

Details ››
Parent Previous Next

Ansi library provide some string macros you can use to simplify the process of text coloring, each message type is defined in the root table Term as follow:


String Macro

Description

Default Colors

Table Key

~{NORM}

Normal messages

White on Black

NormalColor

~{NOTI}

Notice messages

Cyan on Black

NoticeColor

~{WARN}

Warning messages

Yellow on Black, Bold

WarningColor

~{ERRO}

Error messages

Yellow on Red, Bold

ErrorColor

~{ADVI}

Advice messages

Green on Black, Bold

AdviceColor

~{QUOT}

Quoted text

Red on Black, Bold + Italic

QuoteColor

~{PROM}

Prompt (input messages)

Magenta on Black, Bold + Italic

PromptColor


Each table item have the same structure as follow:


{ Fg = AnsiColor,

 Bg = AnsiColor,

 Bold = Bool,

 Italic = Bool,

 Underline = Bool }


For example, the normal messages color (NormalColor), is defined this way:


{ Fg = Ansi.Code.BgBlack,

 Bg = Ansi.Code.FgWhite,

 Bold = False,

 Italic = False,

 Underline = False }

Created with the Personal Edition of HelpNDoc: Free PDF documentation generator