TerminalColors

TextStyles that are automatically downsampled to the level supported by the current terminal.

Strings decorated with these styles will be downsampled correctly even if they are printed directly rather than through Terminal.print.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Render text as bold or increased intensity.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Render text with the danger style from the current theme

Link copied to clipboard

Render text as faint or decreased intensity.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Render text with the info style from the current theme

Link copied to clipboard

Render text with background and foreground colors switched.

Link copied to clipboard

Render text as italic.

Link copied to clipboard
Link copied to clipboard

Render text with the muted style from the current theme

Link copied to clipboard

No style.

Link copied to clipboard
Link copied to clipboard

Render text with a strikethrough.

Link copied to clipboard

Render text with the success style from the current theme

Link copied to clipboard

Underline text.

Link copied to clipboard

Render text with the warning style from the current theme

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun cmyk(c: Int, m: Int, y: Int, k: Int): TextStyle

Create a color code from a CMYK color.

Link copied to clipboard
fun color(color: Color): TextStyle

Create a TextStyle with a foreground of color, downsampled to a given level.

Link copied to clipboard
fun gray(fraction: Number): TextStyle

Create a grayscale color code from a fraction in the range \[0, 1].

Link copied to clipboard
fun hsl(h: Number, s: Number, l: Number): TextStyle

Create a color code from an HSL color.

Link copied to clipboard
fun hsv(h: Number, s: Number, v: Number): TextStyle

Create a color code from an HSV color.

Link copied to clipboard
fun lab(l: Number, a: Number, b: Number): TextStyle

Create a color code from a CIE LAB color.

Link copied to clipboard
fun rgb(hex: String): TextStyle

fun rgb(r: Number, g: Number, b: Number): TextStyle

Create a color code from an RGB color.

Link copied to clipboard
fun xyz(x: Number, y: Number, z: Number): TextStyle

Create a color code from a CIE XYZ color.