Skip to content

Struct TermColor

Declaration
public struct TermColor
Declaration
public ColorKind Kind
Declaration
public byte R
Declaration
public byte G
Declaration
public byte B
Declaration
public static readonly TermColor Default
Declaration
public static TermColor Index(byte i)

DarkEffekt.Terminal.TermColor

Type Name
System.Byte i
Declaration
public static TermColor Rgb(byte r, byte g, byte b)

DarkEffekt.Terminal.TermColor

Type Name
System.Byte r
System.Byte g
System.Byte b

A truecolor from channels of 0 to 1.

Declaration
public static TermColor RgbUnit(float r, float g, float b)

DarkEffekt.Terminal.TermColor

Type Name
System.Single r
System.Single g
System.Single b

A truecolor from a hue, a saturation, and a value, each 0 to 1. The hue wraps.

Declaration
public static TermColor FromHsv(float hue, float saturation, float value)

DarkEffekt.Terminal.TermColor

Type Name
System.Single hue
System.Single saturation
System.Single value

Lerp(TermColor, TermColor, float, ColorMix)

Section titled “Lerp(TermColor, TermColor, float, ColorMix)”

The color a fraction of the way from one color to another, as a truecolor. An indexed color mixes as its xterm palette entry. The default color has no channels to mix, so with one at either end the nearer end is returned as it is.

Declaration
public static TermColor Lerp(TermColor from, TermColor to, float t, ColorMix mix = ColorMix.Srgb)

DarkEffekt.Terminal.TermColor

Type Name
DarkEffekt.Terminal.TermColor from
DarkEffekt.Terminal.TermColor to
System.Single t
DarkEffekt.Terminal.ColorMix mix

A color with its brightness multiplied, as a truecolor: below 1 dims it and above 1 brightens it, up to full. The default color is returned as it is.

Declaration
public static TermColor Scale(TermColor color, float brightness)

DarkEffekt.Terminal.TermColor

Type Name
DarkEffekt.Terminal.TermColor color
System.Single brightness

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(TermColor other)

System.Boolean: true if the current object is equal to the other parameter; otherwise, false.

Type Name Description
DarkEffekt.Terminal.TermColor other An object to compare with this object.

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object obj)

System.Boolean: true if obj and this instance are the same type and represent the same value; otherwise, false.

Type Name Description
System.Object obj The object to compare with the current instance.

Returns the hash code for this instance.

Declaration
public override int GetHashCode()

System.Int32: A 32-bit signed integer that is the hash code for this instance.