Skip to content

Instance Method

consoleStylized(color:background:isBold:)

Wraps a string in the ANSI codes indicated by the style specification.
func consoleStylized(color: ConsoleColor? = nil, background: ConsoleColor? = nil, isBold: Bool = false) -> String

Parameters

color

The foreground ConsoleColor to use.

background

The background ConsoleColor to use.

isBold

If true, the text will be bold.

Return Value

The string wrapped in ANSI codes.