Class RGBColor
A color with red, green and blue components.
public sealed class RGBColor : IColor, IEquatable<RGBColor>
- Inheritance
-
RGBColor
- Implements
- Inherited Members
Constructors
RGBColor(double, double, double)
Create a new RGBColor.
public RGBColor(double r, double g, double b)
Parameters
r
doubleThe red value between 0 and 1.
g
doubleThe green value between 0 and 1.
b
doubleThe blue value between 0 and 1.
Fields
Black
RGB Black value (all 0).
public static RGBColor Black
Field Value
White
RGB White value (all 1).
public static RGBColor White
Field Value
Properties
B
The blue value between 0 and 1.
public double B { get; }
Property Value
ColorSpace
public ColorSpace ColorSpace { get; }
Property Value
G
The green value between 0 and 1.
public double G { get; }
Property Value
R
The red value between 0 and 1.
public double R { get; }
Property Value
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
Equals(RGBColor)
Whether 2 RGB colors are equal across all channels.
public bool Equals(RGBColor other)
Parameters
other
RGBColor
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToRGBValues()
public (double r, double g, double b) ToRGBValues()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(RGBColor, RGBColor)
Equals.
public static bool operator ==(RGBColor color1, RGBColor color2)
Parameters
Returns
operator !=(RGBColor, RGBColor)
Not Equals.
public static bool operator !=(RGBColor color1, RGBColor color2)