Table of Contents

Struct Color

Namespace
Macad.Common
Assembly
Macad.Common.dll

Color value in sRGB.

public struct Color

Constructors

public Color(float r, float g, float b)
r float
g float
b float

public Color(string s)
s string

Fields

public static readonly Color Black
Field Value: Color

public static readonly Color White
Field Value: Color

Properties

public readonly float Blue { get; }
Property Value: float

public readonly float Green { get; }
Property Value: float

public readonly float Red { get; }
Property Value: float

Methods

public bool Equals(Color other)
other Color
Returns: bool

public override bool Equals(object obj)
obj object
Returns: bool

public static Color FromLinearRgb(float r, float g, float b)
r float
g float
b float
Returns: Color

public override int GetHashCode()
Returns: int

public Color Lerp(Color other, float f)
other Color
f float
Returns: Color

public bool Read(Reader reader, SerializationContext context)
reader Reader
context SerializationContext
Returns: bool

public Color Scaled(float scale)
scale float
Returns: Color

public string ToHexString()
Returns: string

public (float r, float g, float b) ToLinearRgb()
Returns: (float r, float g, float b)

public override string ToString()
Returns: string

public bool Write(Writer writer, SerializationContext context)
writer Writer
context SerializationContext
Returns: bool

Operators

public static bool operator ==(Color color1, Color color2)
color1 Color
color2 Color
Returns: bool

public static bool operator !=(Color color1, Color color2)
color1 Color
color2 Color
Returns: bool