SwiftlyS2

Color

Struct Color

Namespace: SwiftlyS2.Shared.Natives

Assembly: SwiftlyS2.CS2.dll

public struct Color : IEquatable<Color>

Implements

Inherited Members

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 A
Field Value

B

public byte B
Field Value

G

public byte G
Field Value

R

public byte R
Field 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
  • booltrue if the current object is equal to the other parameter; otherwise, false.

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
  • booltrue if obj and this instance are the same type and represent the same value; otherwise, false.

FromBuiltin(Color)

public static Color FromBuiltin(Color color)
Parameters
Returns

FromHex(string)

public static Color FromHex(string hex)
Parameters
Returns

FromInt32(int)

public static Color FromInt32(int color)
Parameters
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
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

On this page