Skip to content

NamedColor Class

A color associated with a name.

C#
public record NamedColor : IEquatable<NamedColor>

Inheritance object

Implements IEquatable<NamedColor>

A color associated with a name.

C#
public NamedColor(string Name, Color Color)

Name string
The name of the color.

Color SadRogue.Primitives.Color
The color.

C#
protected NamedColor(NamedColor original)

original NamedColor

C#
protected virtual Type EqualityContract { get; }

The name of the color.

C#
public string Name { get; init; }

The color.

C#
public Color Color { get; init; }
C#
public override string ToString()

string

C#
protected virtual bool PrintMembers(StringBuilder builder)

builder StringBuilder

bool

C#
public override int GetHashCode()

int

C#
public override bool Equals(object? obj)

obj object

bool

C#
public virtual bool Equals(NamedColor? other)

other NamedColor

bool

C#
public void Deconstruct(out string Name, out Color Color)

Name string

Color SadRogue.Primitives.Color