ParseOptionsErrorColor Property

Gets or sets the color applied to error messages.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public TextFormat ErrorColor { get; set; }

Property Value

TextFormat
The virtual terminal sequence for a color. The default value is TextFormatForegroundRed.

Remarks

Only the parsing methods that automatically handle errors will use this property.

The color will only be used if the UseErrorColor property is ; otherwise, it will be replaced with an empty string.

After the error message, the value of the UsageWriterColorReset property will be written to undo the color change.

See Also