Class TextColor
Namespace: Void.Minecraft.Components.Text.Colors
Assembly: Void.Minecraft.dll
public record TextColor : IEquatable<TextColor>Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
TextColor(byte, byte, byte)
public TextColor(byte Red, byte Green, byte Blue)Parameters
Red byte
Green byte
Blue byte
Properties
Blue
public byte Blue { get; init; }Property Value
Green
public byte Green { get; init; }Property Value
Name
public string Name { get; }Property Value
Red
public byte Red { get; init; }Property Value
Methods
Downsample()
public TextColor Downsample()Returns
FromString(string)
public static TextColor FromString(string value)Parameters
value string
Returns
ToString()
Returns the canonical color identifier for this value.
public override string ToString()Returns
Remarks
Named Minecraft colors return their registered identifier, such as red or dark_blue.
Unmapped colors return a hexadecimal RGB string in #RRGGBB format.
Operators
implicit operator TextColor((byte Red, byte Green, byte Blue))
public static implicit operator TextColor((byte Red, byte Green, byte Blue) color)Parameters
color (byte Red, byte Green, byte Blue)
Returns
implicit operator TextColor(Color)
public static implicit operator TextColor(Color color)Parameters
color Color
Returns
implicit operator TextColor(string)
public static implicit operator TextColor(string color)Parameters
color string
Returns
implicit operator Color(TextColor)
public static implicit operator Color(TextColor color)Parameters
color TextColor
Returns
implicit operator string(TextColor)
public static implicit operator string(TextColor color)Parameters
color TextColor