跳到主要内容
版本:Next

Struct Color

Namespace: OblivionMpCSharpMod.Values
Assembly: OblivionMpCSharpMod.dll

A linear RGBA color with components in the 0..1 range.

public readonly struct Color : IEquatable<Color>

Implements​

IEquatable<Color>

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors​

Color(float, float, float, float)​

A linear RGBA color with components in the 0..1 range.

public Color(float R, float G, float B, float A = 1)

Parameters​

R float

Red component (0..1).

G float

Green component (0..1).

B float

Blue component (0..1).

A float

Alpha component (0..1). Defaults to fully opaque.

Properties​

A​

Alpha component (0..1). Defaults to fully opaque.

public float A { get; init; }

Property Value​

float

B​

Blue component (0..1).

public float B { get; init; }

Property Value​

float

G​

Green component (0..1).

public float G { get; init; }

Property Value​

float

R​

Red component (0..1).

public float R { get; init; }

Property Value​

float

Methods​

Deconstruct(out float, out float, out float, out float)​

public void Deconstruct(out float R, out float G, out float B, out float A)

Parameters​

R float

G float

B float

A float

Equals(object)​

public override bool Equals(object obj)

Parameters​

obj object

Returns​

bool

Equals(Color)​

public bool Equals(Color other)

Parameters​

other Color

Returns​

bool

GetHashCode()​

public override int GetHashCode()

Returns​

int

ToString()​

public override string ToString()

Returns​

string

Operators​

operator ==(Color, Color)​

public static bool operator ==(Color left, Color right)

Parameters​

left Color

right Color

Returns​

bool

operator !=(Color, Color)​

public static bool operator !=(Color left, Color right)

Parameters​

left Color

right Color

Returns​

bool

  • Constructors
    • Color(float, float, float, float)
  • Properties
    • A
    • B
    • G
    • R
  • Methods
    • Deconstruct(out float, out float, out float, out float)
    • Equals(object)
    • Equals(Color)
    • GetHashCode()
    • ToString()
  • Operators
    • operator ==(Color, Color)
    • operator !=(Color, Color)