Color
Struct Color
Namespace: SwiftlyS2.Shared.Natives
Assembly: SwiftlyS2.CS2.dll
public struct Color : IEquatable<Color>Implements
Inherited Members
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.ReferenceEquals(object?, object?)
- object.ToString()
Constructors
Color(byte, byte, byte, byte)
public Color(byte r, byte g, byte b, byte a)Parameters
Color(byte, byte, byte)
public Color(byte r, byte g, byte b)Parameters
Color(int, int, int)
public Color(int r, int g, int b)Parameters
Color(int, int, int, int)
public Color(int r, int g, int b, int a)Parameters
Color(char, char, char, char)
public Color(char r, char g, char b, char a)Parameters
Color(char, char, char)
public Color(char r, char g, char b)Parameters
Fields
A
public byte AField Value
B
public byte BField Value
G
public byte GField Value
R
public byte RField Value
Methods
Equals(Color)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Color other)Parameters
- other Color — An object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)Parameters
- obj object? — The object to compare with the current instance.
Returns
- bool — true if
objand this instance are the same type and represent the same value; otherwise, false.
FromBuiltin(Color)
public static Color FromBuiltin(Color color)Parameters
- color Color
Returns
FromHex(string)
public static Color FromHex(string hex)Parameters
- hex string
Returns
FromInt32(int)
public static Color FromInt32(int color)Parameters
- color int
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()Returns
- int — A 32-bit signed integer that is the hash code for this instance.
ToBuiltin()
public readonly Color ToBuiltin()Returns
ToHex(bool)
public readonly string ToHex(bool includeAlpha = false)Parameters
- includeAlpha bool
Returns
ToInt32()
public readonly int ToInt32()Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()Returns
- string — The fully qualified type name.
Operators
operator ==(Color, Color)
public static bool operator ==(Color left, Color right)Parameters
Returns
operator !=(Color, Color)
public static bool operator !=(Color left, Color right)Parameters
Returns