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
case blackBlackcase blueBluecase brightBlackBright blackcase brightBlueBright bluecase brightCyanBright cyancase brightGreenBright greencase brightMagentaBright magentacase brightRedBright redcase brightWhiteBright whitecase brightYellowBright yellowcase custom(r: UInt8, g: UInt8, b: UInt8)A 24-bit “true” colorcase cyanCyancase greenGreencase magentaMagentacase palette(UInt8)A color from the predefined 256-color palettecase redRedcase whiteWhitecase yellowYellow
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype