TryDowngrade(AnsiColorLevel, out AnsiColor) Method

Definition

Namespace XenoAtom.Ansi
Assembly XenoAtom.Ansi.dll

Attempts to downgrade this color to a maximum supported AnsiColorLevel.

public readonly bool TryDowngrade(AnsiColorLevel maxLevel, scoped out AnsiColor downgraded)

Parameters

maxLevel
AnsiColorLevel

The maximum supported level.

downgraded
AnsiColor

The resulting color value.

Returns

Boolean
true if the color could be represented at the requested level.

Remarks

For example, an RGB color can be approximated as an xterm 256-color index, which can then be approximated as a basic 16-color index.