Enumeration
ConsoleColor
Supported colors for creating a
ConsoleStyle for ConsoleText.enum ConsoleColor
Overview
Note
Normal and bright colors are represented here separately instead of as a flag on ConsoleStyle basically because “that’s how ANSI colors work”. It’s a little conceptually weird, but so are terminal control codes.
Topics
Enumeration Cases
ConsoleColor.blackBlackConsoleColor.blueBlueConsoleColor.brightBlackBright blackConsoleColor.brightBlueBright blueConsoleColor.brightCyanBright cyanConsoleColor.brightGreenBright greenConsoleColor.brightMagentaBright magentaConsoleColor.brightRedBright redConsoleColor.brightWhiteBright whiteConsoleColor.brightYellowBright yellowConsoleColor.custom(r:g:b:)A 24-bit “true” colorConsoleColor.cyanCyanConsoleColor.greenGreenConsoleColor.magentaMagentaConsoleColor.palette(_:)A color from the predefined 256-color paletteConsoleColor.redRedConsoleColor.whiteWhiteConsoleColor.yellowYellow
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype
See Also
Terminal
ConsoleProtocol for powering styled Console I/O.TerminalGeneric console that uses a mixture of Swift and C standard libraries to fulfill protocol requirements.ConsoleStyleRepresentation of a style for outputting to a Console in different colors with differing attributes. A few suggested default styles are provided.ConsoleClearSupported methods for clearing theConsole.ConsoleTextA collection ofConsoleTextFragments. Represents stylized text that can be outputted to aConsole.ConsoleTextFragment+(_:_:)Appends aConsoleTextto anotherConsoleText.+=(_:_:)Appends aConsoleTextto anotherConsoleTextin-place.StringProtocol