Companion

object Companion

Functions

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

Create a color code from a CMYK color.

Link copied to clipboard
fun color(color: Color, level: AnsiLevel = TRUECOLOR): TextStyle

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

Link copied to clipboard
fun gray(fraction: Number, level: AnsiLevel = TRUECOLOR): 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, level: AnsiLevel = TRUECOLOR): TextStyle

Create a color code from an HSL color.

Link copied to clipboard
fun hsv(h: Number, s: Number, v: Number, level: AnsiLevel = TRUECOLOR): TextStyle

Create a color code from an HSV color.

Link copied to clipboard
fun lab(l: Number, a: Number, b: Number, level: AnsiLevel = TRUECOLOR): TextStyle

Create a color code from a CIE LAB color.

Link copied to clipboard
fun rgb(hex: String, level: AnsiLevel = TRUECOLOR): TextStyle

fun rgb(r: Number, g: Number, b: Number, level: AnsiLevel = TRUECOLOR): TextStyle

Create a color code from an RGB color.

Link copied to clipboard
fun xyz(x: Number, y: Number, z: Number, level: AnsiLevel = TRUECOLOR): TextStyle

Create a color code from a CIE XYZ color.