Structure
ConsoleStyle
Representation of a style for outputting to a Console in different colors with differing attributes. A few suggested default styles are provided.
struct ConsoleStyle
Topics
Initializers
Instance Properties
let background: ConsoleColor?Optional background color. Ifnilbackground is plain.let color: ConsoleColor?Optional text color. Ifnil, text is plain.let isBold: BoolIftrue, text is bold.
Type Properties
static var error: ConsoleStyleRed text with no background.static var info: ConsoleStyleLight blue text with no background.static var plain: ConsoleStylePlain text with no color or background.static var success: ConsoleStyleGreen text with no background.static var warning: ConsoleStyleYellow text with no background.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype
See Also
Terminal
protocol ConsoleProtocol for powering styled Console I/O.class TerminalGeneric console that uses a mixture of Swift and C standard libraries to fulfill protocol requirements.enum ConsoleColorSupported colors for creating aConsoleStyleforConsoleText.enum ConsoleClearSupported methods for clearing theConsole.struct ConsoleTextA collection ofConsoleTextFragments. Represents stylized text that can be outputted to aConsole.struct ConsoleTextFragmentfunc + (ConsoleText, ConsoleText) -> ConsoleTextAppends aConsoleTextto anotherConsoleText.func += (inout ConsoleText, ConsoleText)Appends aConsoleTextto anotherConsoleTextin-place.extension StringProtocol