Struct Color
Color value in sRGB.
public struct Color
Constructors
public Color(float r, float g, float b)
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)
- Returns: Color
public override int GetHashCode()
- Returns: int
public Color Lerp(Color other, float f)
- Returns: Color
public bool Read(Reader reader, SerializationContext context)
reader
Readercontext
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()
public override string ToString()
- Returns: string
public bool Write(Writer writer, SerializationContext context)
writer
Writercontext
SerializationContext
- Returns: bool
Operators
public static bool operator ==(Color color1, Color color2)
- Returns: bool
public static bool operator !=(Color color1, Color color2)
- Returns: bool