Color Type
A 4-channel, floating point color. Copied from - https://github.com/opentk/opentk/blob/opentk5.0/src/OpenTK.Mathematics/Colors/Color4.cs Modified to provide RGBA format.
Constructors
| Constructor | Description |
Full Usage:
Color(r, g, b, a)
Parameters:
float32
g : float32
b : float32
a : float32
|
|
Full Usage:
Color(r, g, b, a)
Parameters:
byte
g : byte
b : byte
a : byte
|
|
Full Usage:
Color(packed)
Parameters:
uint32
-
|
|
Instance members
| Instance member | Description | ||
Full Usage:
this.A8
Returns: byte
|
The alpha component as a byte.
|
||
Full Usage:
this.Abgr
Returns: uint32
|
The packed value in ABGR order.
|
||
Full Usage:
this.Argb
Returns: uint32
|
The packed value in ARGB order.
|
||
Full Usage:
this.B8
Returns: byte
|
The blue component as a byte.
|
||
Full Usage:
this.Bgra
Returns: uint32
|
The packed value in BGRA order.
|
||
Full Usage:
this.CompareTo
Parameters:
Color
-
The Color instance to compare with this instance.
Returns: int
A signed integer that indicates the relative order of the objects being compared. Returns less than zero if
this instance precedes color; zero if they are equal; greater than zero if this instance
follows color.
Modifiers: abstract |
Compares this Color instance to another and returns an integer that indicates whether this instance precedes, follows, or occurs in the same position in the sort order as the specified Color. The comparison is performed by evaluating the R, G, B, and A components in order. This method is useful for sorting or ordering Color instances.
|
||
Full Usage:
this.CompareTo
Parameters:
obj
-
An object to compare with the current Color instance. Must be a Color.
Returns: int
A value less than zero if this instance precedes the specified object; zero if they are equal; a value
greater than zero if this instance follows the specified object.
Modifiers: abstract |
Compares the current Color instance with another object and returns an integer that indicates their relative order.
|
||
Full Usage:
this.Equals
Parameters:
Color
-
The Color structure to compare to.
Returns: bool
True if both Color structures contain the same components; false otherwise.
Modifiers: abstract |
Compares whether this Color structure is equal to the specified Color.
|
||
Full Usage:
this.Equals
Parameters:
obj
-
An object to compare to.
Returns: bool
True obj is a Color structure with the same components as this Color; false otherwise.
Modifiers: abstract |
Compares whether this Color structure is equal to the specified object.
|
||
Full Usage:
this.G8
Returns: byte
|
The green component as a byte.
|
||
Full Usage:
this.GetHashCode
Returns: int
A System.Int32 containing the hashcode of this Color structure.
Modifiers: abstract |
Calculates the hash code for this Color structure.
|
||
Full Usage:
this.R8
Returns: byte
|
The red component as a byte.
|
||
Full Usage:
this.Rgba
Returns: uint32
|
The packed value in RGBA order.
|
||
Full Usage:
this.ToArray
Returns: float32[]
|
Convert a color to a 4D float array.
|
||
Full Usage:
this.ToString
Returns: string
A String that describes this Color structure.
Modifiers: abstract |
|||
Static members
| Static member | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gets system color alice blue corresponding to 240 248 255 255 (0.9411765, 0.972549, 1, 1).
|
|
Gets system color antique white corresponding to 250 235 215 255 (0.98039216, 0.92156863, 0.84313726, 1).
|
|
Gets system color aqua corresponding to 0 255 255 255 (0, 1, 1, 1).
|
|
Gets system color aquamarine corresponding to 127 255 212 255 (0.49803922, 1, 0.83137256, 1).
|
|
Gets system color azure corresponding to 240 255 255 255 (0.9411765, 1, 1, 1).
|
|
Gets system color beige corresponding to 245 245 220 255 (0.9607843, 0.9607843, 0.8627451, 1).
|
|
Gets system color bisque corresponding to 255 228 196 255 (1, 0.89411765, 0.76862746, 1).
|
|
Gets system color black corresponding to 0 0 0 255 (0, 0, 0, 1).
|
|
Gets system color blanched almond corresponding to 255 235 205 255 (1, 0.92156863, 0.8039216, 1).
|
|
Gets system color blue corresponding to 0 0 255 255 (0, 0, 1, 1).
|
|
Gets system color blue violet corresponding to 138 43 226 255 (0.5411765, 0.16862746, 0.8862745, 1).
|
|
Gets system color brown corresponding to 165 42 42 255 (0.64705884, 0.16470589, 0.16470589, 1).
|
|
Gets system color burlywood corresponding to 222 184 135 255 (0.87058824, 0.72156864, 0.5294118, 1).
|
|
Gets system color cadet blue corresponding to 95 158 160 255 (0.37254903, 0.61960787, 0.627451, 1).
|
|
Gets system color chartreuse corresponding to 127 255 0 255 (0.49803922, 1, 0, 1).
|
|
Gets system color chocolate corresponding to 210 105 30 255 (0.8235294, 0.4117647, 0.11764706, 1).
|
|
Gets system color coral corresponding to 255 127 80 255 (1, 0.49803922, 0.3137255, 1).
|
|
Gets system color cornflower blue corresponding to 100 149 237 255 (0.39215687, 0.58431375, 0.92941177, 1).
|
|
Gets system color cornsilk corresponding to 255 248 220 255 (1, 0.972549, 0.8627451, 1).
|
|
Gets system color crimson corresponding to 220 20 60 255 (0.8627451, 0.078431375, 0.23529412, 1).
|
|
Gets system color cyan corresponding to 0 255 255 255 (0, 1, 1, 1).
|
|
Gets system color dark blue corresponding to 0 0 139 255 (0, 0, 0.54509807, 1).
|
|
Gets system color dark cyan corresponding to 0 139 139 255 (0, 0.54509807, 0.54509807, 1).
|
|
Gets system color dark goldenrod corresponding to 184 134 11 255 (0.72156864, 0.5254902, 0.043137256, 1).
|
|
Gets system color dark gray corresponding to 169 169 169 255 (0.6627451, 0.6627451, 0.6627451, 1).
|
|
Gets system color dark green corresponding to 0 100 0 255 (0, 0.39215687, 0, 1).
|
|
Gets system color dark khaki corresponding to 189 183 107 255 (0.7411765, 0.7176471, 0.41960785, 1).
|
|
Gets system color dark magenta corresponding to 139 0 139 255 (0.54509807, 0, 0.54509807, 1).
|
|
Gets system color dark olive green corresponding to 85 107 47 255 (0.33333334, 0.41960785, 0.18431373, 1).
|
|
Gets system color dark orange corresponding to 255 140 0 255 (1, 0.54901963, 0, 1).
|
|
Gets system color dark orchid corresponding to 153 50 204 255 (0.6, 0.19607843, 0.8, 1).
|
|
Gets system color dark red corresponding to 139 0 0 255 (0.54509807, 0, 0, 1).
|
|
Gets system color dark salmon corresponding to 233 150 122 255 (0.9137255, 0.5882353, 0.47843137, 1).
|
|
Gets system color dark sea green corresponding to 143 188 139 255 (0.56078434, 0.7372549, 0.54509807, 1).
|
|
Gets system color dark slate blue corresponding to 72 61 139 255 (0.28235295, 0.23921569, 0.54509807, 1).
|
|
Gets system color dark slate gray corresponding to 47 79 79 255 (0.18431373, 0.30980393, 0.30980393, 1).
|
|
Gets system color dark turquoise corresponding to 0 206 209 255 (0, 0.80784315, 0.81960785, 1).
|
|
Gets system color dark violet corresponding to 148 0 211 255 (0.5803922, 0, 0.827451, 1).
|
|
Gets system color deep pink corresponding to 255 20 147 255 (1, 0.078431375, 0.5764706, 1).
|
|
Gets system color deep sky blue corresponding to 0 191 255 255 (0, 0.7490196, 1, 1).
|
|
Gets system color dim gray corresponding to 105 105 105 255 (0.4117647, 0.4117647, 0.4117647, 1).
|
|
|
|
|
|
Gets system color dodger blue corresponding to 30 144 255 255 (0.11764706, 0.5647059, 1, 1).
|
|
Gets system color fire brick corresponding to 178 34 34 255 (0.69803923, 0.13333334, 0.13333334, 1).
|
|
Gets system color floral white corresponding to 255 250 240 255 (1, 0.98039216, 0.9411765, 1).
|
|
Gets system color forest green corresponding to 34 139 34 255 (0.13333334, 0.54509807, 0.13333334, 1).
|
|
Gets system color fuchsia corresponding to 255 0 255 255 (1, 0, 1, 1).
|
|
Gets system color gainsboro corresponding to 220 220 220 255 (0.8627451, 0.8627451, 0.8627451, 1).
|
|
Gets system color ghost white corresponding to 248 248 255 255 (0.972549, 0.972549, 1, 1).
|
|
Gets system color gold corresponding to 255 215 0 255 (1, 0.84313726, 0, 1).
|
|
Gets system color goldenrod corresponding to 218 165 32 255 (0.85490197, 0.64705884, 0.1254902, 1).
|
|
Gets system color gray corresponding to 128 128 128 255 (0.5019608, 0.5019608, 0.5019608, 1).
|
|
Gets system color green corresponding to 0 128 0 255 (0, 0.5019608, 0, 1).
|
|
Gets system color green yellow corresponding to 173 255 47 255 (0.6784314, 1, 0.18431373, 1).
|
|
Gets system color honeydew corresponding to 240 255 240 255 (0.9411765, 1, 0.9411765, 1).
|
|
Gets system color hot pink corresponding to 255 105 180 255 (1, 0.4117647, 0.7058824, 1).
|
|
Gets system color indian red corresponding to 205 92 92 255 (0.8039216, 0.36078432, 0.36078432, 1).
|
|
Gets system color indigo corresponding to 75 0 130 255 (0.29411766, 0, 0.50980395, 1).
|
|
Gets system color ivory corresponding to 255 255 240 255 (1, 1, 0.9411765, 1).
|
|
Gets system color khaki corresponding to 240 230 140 255 (0.9411765, 0.9019608, 0.54901963, 1).
|
|
Gets system color lavender corresponding to 230 230 250 255 (0.9019608, 0.9019608, 0.98039216, 1).
|
|
Gets system color lavender blush corresponding to 255 240 245 255 (1, 0.9411765, 0.9607843, 1).
|
|
Gets system color lawn green corresponding to 124 252 0 255 (0.4862745, 0.9882353, 0, 1).
|
|
Gets system color lemon chiffon corresponding to 255 250 205 255 (1, 0.98039216, 0.8039216, 1).
|
|
|
|
Gets system color light blue corresponding to 173 216 230 255 (0.6784314, 0.84705883, 0.9019608, 1).
|
|
Gets system color light coral corresponding to 240 128 128 255 (0.9411765, 0.5019608, 0.5019608, 1).
|
|
Gets system color light cyan corresponding to 224 255 255 255 (0.8784314, 1, 1, 1).
|
|
Gets system color light goldenrod yellow corresponding to 250 250 210 255 (0.98039216, 0.98039216, 0.8235294, 1).
|
|
Gets system color light gray corresponding to 211 211 211 255 (0.827451, 0.827451, 0.827451, 1).
|
|
Gets system color light green corresponding to 144 238 144 255 (0.5647059, 0.93333334, 0.5647059, 1).
|
|
Gets system color light pink corresponding to 255 182 193 255 (1, 0.7137255, 0.75686276, 1).
|
|
Gets system color light salmon corresponding to 255 160 122 255 (1, 0.627451, 0.47843137, 1).
|
|
Gets system color light sea green corresponding to 32 178 170 255 (0.1254902, 0.69803923, 0.6666667, 1).
|
|
Gets system color light sky blue corresponding to 135 206 250 255 (0.5294118, 0.80784315, 0.98039216, 1).
|
|
Gets system color light slate gray corresponding to 119 136 153 255 (0.46666667, 0.53333336, 0.6, 1).
|
|
Gets system color light steel blue corresponding to 176 196 222 255 (0.6901961, 0.76862746, 0.87058824, 1).
|
|
Gets system color light yellow corresponding to 255 255 224 255 (1, 1, 0.8784314, 1).
|
|
Gets system color lime corresponding to 0 255 0 255 (0, 1, 0, 1).
|
|
Gets system color lime green corresponding to 50 205 50 255 (0.19607843, 0.8039216, 0.19607843, 1).
|
|
Gets system color linen corresponding to 250 240 230 255 (0.98039216, 0.9411765, 0.9019608, 1).
|
|
Gets system color magenta corresponding to 255 0 255 255 (1, 0, 1, 1).
|
|
Gets system color maroon corresponding to 128 0 0 255 (0.5019608, 0, 0, 1).
|
|
Gets system color medium aquamarine corresponding to 102 205 170 255 (0.4, 0.8039216, 0.6666667, 1).
|
|
Gets system color medium blue corresponding to 0 0 205 255 (0, 0, 0.8039216, 1).
|
|
Gets system color medium orchid corresponding to 186 85 211 255 (0.7294118, 0.33333334, 0.827451, 1).
|
|
Gets system color medium purple corresponding to 147 112 219 255 (0.5764706, 0.4392157, 0.85882354, 1).
|
|
Gets system color medium sea green corresponding to 60 179 113 255 (0.23529412, 0.7019608, 0.44313726, 1).
|
|
Gets system color medium slate blue corresponding to 123 104 238 255 (0.48235294, 0.40784314, 0.93333334, 1).
|
|
Gets system color medium spring green corresponding to 0 250 154 255 (0, 0.98039216, 0.6039216, 1).
|
|
Gets system color medium turquoise corresponding to 72 209 204 255 (0.28235295, 0.81960785, 0.8, 1).
|
|
Gets system color medium violet red corresponding to 199 21 133 255 (0.78039217, 0.08235294, 0.52156866, 1).
|
|
Gets system color midnight blue corresponding to 25 25 112 255 (0.09803922, 0.09803922, 0.4392157, 1).
|
|
Gets system color mint cream corresponding to 245 255 250 255 (0.9607843, 1, 0.98039216, 1).
|
|
Gets system color mistyrose corresponding to 255 228 225 255 (1, 0.89411765, 0.88235295, 1).
|
|
Gets system color moccasin corresponding to 255 228 181 255 (1, 0.89411765, 0.70980394, 1).
|
|
|
|
|
|
Gets system color navajo white corresponding to 255 222 173 255 (1, 0.87058824, 0.6784314, 1).
|
|
Gets system color navy corresponding to 0 0 128 255 (0, 0, 0.5019608, 1).
|
|
Gets system color old lace corresponding to 253 245 230 255 (0.99215686, 0.9607843, 0.9019608, 1).
|
|
Gets system color olive corresponding to 128 128 0 255 (0.5019608, 0.5019608, 0, 1).
|
|
Gets system color olive drab corresponding to 107 142 35 255 (0.41960785, 0.5568628, 0.13725491, 1).
|
The Unit color.
|
|
|
Gets system color orange corresponding to 255 165 0 255 (1, 0.64705884, 0, 1).
|
|
Gets system color orange red corresponding to 255 69 0 255 (1, 0.27058825, 0, 1).
|
|
Gets system color orchid corresponding to 218 112 214 255 (0.85490197, 0.4392157, 0.8392157, 1).
|
|
Gets system color pale goldenrod corresponding to 238 232 170 255 (0.93333334, 0.9098039, 0.6666667, 1).
|
|
Gets system color pale green corresponding to 152 251 152 255 (0.59607846, 0.9843137, 0.59607846, 1).
|
|
Gets system color pale turquoise corresponding to 175 238 238 255 (0.6862745, 0.93333334, 0.93333334, 1).
|
|
Gets system color pale violet red corresponding to 219 112 147 255 (0.85882354, 0.4392157, 0.5764706, 1).
|
|
Gets system color papaya whip corresponding to 255 239 213 255 (1, 0.9372549, 0.8352941, 1).
|
|
Gets system color peach puff corresponding to 255 218 185 255 (1, 0.85490197, 0.7254902, 1).
|
|
Gets system color peru corresponding to 205 133 63 255 (0.8039216, 0.52156866, 0.24705882, 1).
|
|
Gets system color pink corresponding to 255 192 203 255 (1, 0.7529412, 0.79607844, 1).
|
|
Gets system color plum corresponding to 221 160 221 255 (0.8666667, 0.627451, 0.8666667, 1).
|
|
Gets system color powder blue corresponding to 176 224 230 255 (0.6901961, 0.8784314, 0.9019608, 1).
|
|
Gets system color purple corresponding to 128 0 128 255 (0.5019608, 0, 0.5019608, 1).
|
Gets system color red corresponding to 255 0 0 255 (1, 0, 0, 1).
|
|
|
Gets system color rosy brown corresponding to 188 143 143 255 (0.7372549, 0.56078434, 0.56078434, 1).
|
|
Gets system color royal blue corresponding to 65 105 225 255 (0.25490198, 0.4117647, 0.88235295, 1).
|
|
Gets system color saddle brown corresponding to 139 69 19 255 (0.54509807, 0.27058825, 0.07450981, 1).
|
|
Gets system color salmon corresponding to 250 128 114 255 (0.98039216, 0.5019608, 0.44705883, 1).
|
|
Gets system color sandy brown corresponding to 244 164 96 255 (0.95686275, 0.6431373, 0.3764706, 1).
|
|
Gets system color sea green corresponding to 46 139 87 255 (0.18039216, 0.54509807, 0.34117648, 1).
|
|
Gets system color seashell corresponding to 255 245 238 255 (1, 0.9607843, 0.93333334, 1).
|
|
Gets system color sienna corresponding to 160 82 45 255 (0.627451, 0.32156864, 0.1764706, 1).
|
|
Gets system color silver corresponding to 192 192 192 255 (0.7529412, 0.7529412, 0.7529412, 1).
|
|
Gets system color sky blue corresponding to 135 206 235 255 (0.5294118, 0.80784315, 0.92156863, 1).
|
|
Gets system color slate blue corresponding to 106 90 205 255 (0.41568628, 0.3529412, 0.8039216, 1).
|
|
Gets system color slate gray corresponding to 112 128 144 255 (0.4392157, 0.5019608, 0.5647059, 1).
|
|
Gets system color snow corresponding to 255 250 250 255 (1, 0.98039216, 0.98039216, 1).
|
|
Gets system color spring green corresponding to 0 255 127 255 (0, 1, 0.49803922, 1).
|
|
Gets system color steel blue corresponding to 70 130 180 255 (0.27450982, 0.50980395, 0.7058824, 1).
|
Gets system color tan corresponding to 210 180 140 255 (0.8235294, 0.7058824, 0.54901963, 1).
|
|
|
Gets system color teal corresponding to 0 128 128 255 (0, 0.5019608, 0.5019608, 1).
|
|
Gets system color thistle corresponding to 216 191 216 255 (0.84705883, 0.7490196, 0.84705883, 1).
|
|
Gets system color tomato corresponding to 255 99 71 255 (1, 0.3882353, 0.2784314, 1).
|
|
Gets system color turquoise corresponding to 64 224 208 255 (0.2509804, 0.8784314, 0.8156863, 1).
|
|
Gets system color violet corresponding to 238 130 238 255 (0.93333334, 0.50980395, 0.93333334, 1).
|
|
Gets system color wheat corresponding to 245 222 179 255 (0.9607843, 0.87058824, 0.7019608, 1).
|
|
Gets system color white corresponding to 255 255 255 255 (1, 1, 1, 1).
|
|
Gets system color white smoke corresponding to 245 245 245 255 (0.9607843, 0.9607843, 0.9607843, 1).
|
|
Gets system color yellow corresponding to 255 255 0 255 (1, 1, 0, 1).
|
|
Gets system color yellow green corresponding to 154 205 50 255 (0.6039216, 0.8039216, 0.19607843, 1).
|
|
The Zero color.
|
Nu