NamedColor Class
Definition
Section titled “Definition”A color associated with a name.
public record NamedColor : IEquatable<NamedColor>Inheritance object
Implements IEquatable<NamedColor>
Constructors
Section titled “Constructors”NamedColor(string, Color)
Section titled “NamedColor(string, Color)”A color associated with a name.
public NamedColor(string Name, Color Color)Parameters
Section titled “Parameters”Name string
The name of the color.
Color SadRogue.Primitives.Color
The color.
NamedColor(NamedColor)
Section titled “NamedColor(NamedColor)”protected NamedColor(NamedColor original)Parameters
Section titled “Parameters”original NamedColor
Properties
Section titled “Properties”EqualityContract
Section titled “EqualityContract”protected virtual Type EqualityContract { get; }The name of the color.
public string Name { get; init; }The color.
public Color Color { get; init; }Methods
Section titled “Methods”ToString()
Section titled “ToString()”public override string ToString()Returns
Section titled “Returns”PrintMembers(StringBuilder)
Section titled “PrintMembers(StringBuilder)”protected virtual bool PrintMembers(StringBuilder builder)Parameters
Section titled “Parameters”builder StringBuilder
Returns
Section titled “Returns”GetHashCode()
Section titled “GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”Equals(object?)
Section titled “Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object
Returns
Section titled “Returns”Equals(NamedColor?)
Section titled “Equals(NamedColor?)”public virtual bool Equals(NamedColor? other)Parameters
Section titled “Parameters”other NamedColor
Returns
Section titled “Returns”Deconstruct(out string, out Color)
Section titled “Deconstruct(out string, out Color)”public void Deconstruct(out string Name, out Color Color)Parameters
Section titled “Parameters”Name string
Color SadRogue.Primitives.Color