Color

sealed class Color(source)

Represents a color that can be used for foreground or background styling in a terminal.

Supports various color formats including standard ANSI 16, ANSI 256, and TrueColor (RGB).

Inheritors

Types

Link copied to clipboard
data class Ansi16(val code: Int) : Color

A standard ANSI 16 color.

Link copied to clipboard
data class Ansi256(val code: Int) : Color

An extended ANSI 256 color.

Link copied to clipboard
object Companion
Link copied to clipboard
data object Default : Color

The terminal's default color.

Link copied to clipboard
data class RGB(val r: Int, val g: Int, val b: Int) : Color

A TrueColor representation using 8-bit red, green, and blue components.