Struct TermColor
Assembly: DarkEffekt.Terminal.Core
Section titled “Assembly: DarkEffekt.Terminal.Core”public struct TermColorFields
Section titled “Fields”public ColorKind Kindpublic byte Rpublic byte Gpublic byte BDefault
Section titled “Default”public static readonly TermColor DefaultMethods
Section titled “Methods”Index(byte)
Section titled “Index(byte)”public static TermColor Index(byte i)Returns
Section titled “Returns”Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Byte |
i |
Rgb(byte, byte, byte)
Section titled “Rgb(byte, byte, byte)”public static TermColor Rgb(byte r, byte g, byte b)Returns
Section titled “Returns”Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Byte |
r |
System.Byte |
g |
System.Byte |
b |
RgbUnit(float, float, float)
Section titled “RgbUnit(float, float, float)”A truecolor from channels of 0 to 1.
public static TermColor RgbUnit(float r, float g, float b)Returns
Section titled “Returns”Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Single |
r |
System.Single |
g |
System.Single |
b |
FromHsv(float, float, float)
Section titled “FromHsv(float, float, float)”A truecolor from a hue, a saturation, and a value, each 0 to 1. The hue wraps.
public static TermColor FromHsv(float hue, float saturation, float value)Returns
Section titled “Returns”Parameters
Section titled “Parameters”| 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.
public static TermColor Lerp(TermColor from, TermColor to, float t, ColorMix mix = ColorMix.Srgb)Returns
Section titled “Returns”Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.TermColor | from |
| DarkEffekt.Terminal.TermColor | to |
System.Single |
t |
| DarkEffekt.Terminal.ColorMix | mix |
Scale(TermColor, float)
Section titled “Scale(TermColor, float)”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.
public static TermColor Scale(TermColor color, float brightness)Returns
Section titled “Returns”Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.TermColor | color |
System.Single |
brightness |
Equals(TermColor)
Section titled “Equals(TermColor)”Indicates whether the current object is equal to another object of the same type.
public bool Equals(TermColor other)Returns
Section titled “Returns”System.Boolean: true if the current object is equal to the other parameter; otherwise, false.
Parameters
Section titled “Parameters”| Type | Name | Description |
|---|---|---|
| DarkEffekt.Terminal.TermColor | other | An object to compare with this object. |
Equals(object)
Section titled “Equals(object)”Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)Returns
Section titled “Returns”System.Boolean: true if obj and this instance are the same type and represent the same value; otherwise, false.
Parameters
Section titled “Parameters”| Type | Name | Description |
|---|---|---|
System.Object |
obj | The object to compare with the current instance. |
GetHashCode()
Section titled “GetHashCode()”Returns the hash code for this instance.
public override int GetHashCode()Returns
Section titled “Returns”System.Int32: A 32-bit signed integer that is the hash code for this instance.