Show / Hide Table of Contents

Class Color

Represents a four-component color using red, green, blue, and alpha data.

Inheritance
System.Object
Color
Namespace: VRageMath
Assembly: VRage.Math.dll
Syntax
public sealed class Color : ValueType, IPackedVector<uint>, IPackedVector, IEquatable<Color>

Constructors

Color(Int32, Int32, Int32)

Creates a new instance of the class.

Declaration
public Color(int r, int g, int b)
Parameters
Type Name Description
System.Int32 r

Red component.

System.Int32 g

Green component.

System.Int32 b

Blue component.

Color(Int32, Int32, Int32, Int32)

Creates a new instance of the class.

Declaration
public Color(int r, int g, int b, int a)
Parameters
Type Name Description
System.Int32 r

Red component.

System.Int32 g

Green component.

System.Int32 b

Blue component.

System.Int32 a

Alpha component.

Color(Single)

Declaration
public Color(float rgb)
Parameters
Type Name Description
System.Single rgb

Color(Single, Single, Single)

Creates a new instance of the class.

Declaration
public Color(float r, float g, float b)
Parameters
Type Name Description
System.Single r

Red component.

System.Single g

Green component.

System.Single b

Blue component.

Color(Single, Single, Single, Single)

Creates a new instance of the class.

Declaration
public Color(float r, float g, float b, float a)
Parameters
Type Name Description
System.Single r

Red component.

System.Single g

Green component.

System.Single b

Blue component.

System.Single a

Alpha component.

Color(UInt32)

Declaration
public Color(uint packedValue)
Parameters
Type Name Description
System.UInt32 packedValue

Color(Color, Single)

Declaration
public Color(Color color, float a)
Parameters
Type Name Description
Color color
System.Single a

Color(Vector3)

Creates a new instance of the class.

Declaration
public Color(Vector3 vector)
Parameters
Type Name Description
Vector3 vector

A three-component color.

Color(Vector4)

Creates a new instance of the class.

Declaration
public Color(Vector4 vector)
Parameters
Type Name Description
Vector4 vector

A four-component color.

Fields

PackedValue

Gets the current color as a packed value.

Declaration
public uint PackedValue
Field Value
Type Description
System.UInt32

Properties

A

Gets or sets the alpha component value.

Declaration
public byte A { get; set; }
Property Value
Type Description
System.Byte

AliceBlue

Gets a system-defined color with the value R:240 G:248 B:255 A:255.

Declaration
public static Color AliceBlue { get; }
Property Value
Type Description
Color

AntiqueWhite

Gets a system-defined color with the value R:250 G:235 B:215 A:255.

Declaration
public static Color AntiqueWhite { get; }
Property Value
Type Description
Color

Aqua

Gets a system-defined color with the value R:0 G:255 B:255 A:255.

Declaration
public static Color Aqua { get; }
Property Value
Type Description
Color

Aquamarine

Gets a system-defined color with the value R:127 G:255 B:212 A:255.

Declaration
public static Color Aquamarine { get; }
Property Value
Type Description
Color

Azure

Gets a system-defined color with the value R:240 G:255 B:255 A:255.

Declaration
public static Color Azure { get; }
Property Value
Type Description
Color

B

Gets or sets the blue component value of this Color.

Declaration
public byte B { get; set; }
Property Value
Type Description
System.Byte

Beige

Gets a system-defined color with the value R:245 G:245 B:220 A:255.

Declaration
public static Color Beige { get; }
Property Value
Type Description
Color

Bisque

Gets a system-defined color with the value R:255 G:228 B:196 A:255.

Declaration
public static Color Bisque { get; }
Property Value
Type Description
Color

Black

Gets a system-defined color with the value R:0 G:0 B:0 A:255.

Declaration
public static Color Black { get; }
Property Value
Type Description
Color

BlanchedAlmond

Gets a system-defined color with the value R:255 G:235 B:205 A:255.

Declaration
public static Color BlanchedAlmond { get; }
Property Value
Type Description
Color

Blue

Gets a system-defined color with the value R:0 G:0 B:255 A:255.

Declaration
public static Color Blue { get; }
Property Value
Type Description
Color

BlueViolet

Gets a system-defined color with the value R:138 G:43 B:226 A:255.

Declaration
public static Color BlueViolet { get; }
Property Value
Type Description
Color

Brown

Gets a system-defined color with the value R:165 G:42 B:42 A:255.

Declaration
public static Color Brown { get; }
Property Value
Type Description
Color

BurlyWood

Gets a system-defined color with the value R:222 G:184 B:135 A:255.

Declaration
public static Color BurlyWood { get; }
Property Value
Type Description
Color

CadetBlue

Gets a system-defined color with the value R:95 G:158 B:160 A:255.

Declaration
public static Color CadetBlue { get; }
Property Value
Type Description
Color

Chartreuse

Gets a system-defined color with the value R:127 G:255 B:0 A:255.

Declaration
public static Color Chartreuse { get; }
Property Value
Type Description
Color

Chocolate

Gets a system-defined color with the value R:210 G:105 B:30 A:255.

Declaration
public static Color Chocolate { get; }
Property Value
Type Description
Color

Coral

Gets a system-defined color with the value R:255 G:127 B:80 A:255.

Declaration
public static Color Coral { get; }
Property Value
Type Description
Color

CornflowerBlue

Gets a system-defined color with the value R:100 G:149 B:237 A:255.

Declaration
public static Color CornflowerBlue { get; }
Property Value
Type Description
Color

Cornsilk

Gets a system-defined color with the value R:255 G:248 B:220 A:255.

Declaration
public static Color Cornsilk { get; }
Property Value
Type Description
Color

Crimson

Gets a system-defined color with the value R:220 G:20 B:60 A:255.

Declaration
public static Color Crimson { get; }
Property Value
Type Description
Color

Cyan

Gets a system-defined color with the value R:0 G:255 B:255 A:255.

Declaration
public static Color Cyan { get; }
Property Value
Type Description
Color

DarkBlue

Gets a system-defined color with the value R:0 G:0 B:139 A:255.

Declaration
public static Color DarkBlue { get; }
Property Value
Type Description
Color

DarkCyan

Gets a system-defined color with the value R:0 G:139 B:139 A:255.

Declaration
public static Color DarkCyan { get; }
Property Value
Type Description
Color

DarkGoldenrod

Gets a system-defined color with the value R:184 G:134 B:11 A:255.

Declaration
public static Color DarkGoldenrod { get; }
Property Value
Type Description
Color

DarkGray

Gets a system-defined color with the value R:169 G:169 B:169 A:255.

Declaration
public static Color DarkGray { get; }
Property Value
Type Description
Color

DarkGreen

Gets a system-defined color with the value R:0 G:100 B:0 A:255.

Declaration
public static Color DarkGreen { get; }
Property Value
Type Description
Color

DarkKhaki

Gets a system-defined color with the value R:189 G:183 B:107 A:255.

Declaration
public static Color DarkKhaki { get; }
Property Value
Type Description
Color

DarkMagenta

Gets a system-defined color with the value R:139 G:0 B:139 A:255.

Declaration
public static Color DarkMagenta { get; }
Property Value
Type Description
Color

DarkOliveGreen

Gets a system-defined color with the value R:85 G:107 B:47 A:255.

Declaration
public static Color DarkOliveGreen { get; }
Property Value
Type Description
Color

DarkOrange

Gets a system-defined color with the value R:255 G:140 B:0 A:255.

Declaration
public static Color DarkOrange { get; }
Property Value
Type Description
Color

DarkOrchid

Gets a system-defined color with the value R:153 G:50 B:204 A:255.

Declaration
public static Color DarkOrchid { get; }
Property Value
Type Description
Color

DarkRed

Gets a system-defined color with the value R:139 G:0 B:0 A:255.

Declaration
public static Color DarkRed { get; }
Property Value
Type Description
Color

DarkSalmon

Gets a system-defined color with the value R:233 G:150 B:122 A:255.

Declaration
public static Color DarkSalmon { get; }
Property Value
Type Description
Color

DarkSeaGreen

Gets a system-defined color with the value R:143 G:188 B:139 A:255.

Declaration
public static Color DarkSeaGreen { get; }
Property Value
Type Description
Color

DarkSlateBlue

Gets a system-defined color with the value R:72 G:61 B:139 A:255.

Declaration
public static Color DarkSlateBlue { get; }
Property Value
Type Description
Color

DarkSlateGray

Gets a system-defined color with the value R:47 G:79 B:79 A:255.

Declaration
public static Color DarkSlateGray { get; }
Property Value
Type Description
Color

DarkTurquoise

Gets a system-defined color with the value R:0 G:206 B:209 A:255.

Declaration
public static Color DarkTurquoise { get; }
Property Value
Type Description
Color

DarkViolet

Gets a system-defined color with the value R:148 G:0 B:211 A:255.

Declaration
public static Color DarkViolet { get; }
Property Value
Type Description
Color

DeepPink

Gets a system-defined color with the value R:255 G:20 B:147 A:255.

Declaration
public static Color DeepPink { get; }
Property Value
Type Description
Color

DeepSkyBlue

Gets a system-defined color with the value R:0 G:191 B:255 A:255.

Declaration
public static Color DeepSkyBlue { get; }
Property Value
Type Description
Color

DimGray

Gets a system-defined color with the value R:105 G:105 B:105 A:255.

Declaration
public static Color DimGray { get; }
Property Value
Type Description
Color

DodgerBlue

Gets a system-defined color with the value R:30 G:144 B:255 A:255.

Declaration
public static Color DodgerBlue { get; }
Property Value
Type Description
Color

Firebrick

Gets a system-defined color with the value R:178 G:34 B:34 A:255.

Declaration
public static Color Firebrick { get; }
Property Value
Type Description
Color

FloralWhite

Gets a system-defined color with the value R:255 G:250 B:240 A:255.

Declaration
public static Color FloralWhite { get; }
Property Value
Type Description
Color

ForestGreen

Gets a system-defined color with the value R:34 G:139 B:34 A:255.

Declaration
public static Color ForestGreen { get; }
Property Value
Type Description
Color

Fuchsia

Gets a system-defined color with the value R:255 G:0 B:255 A:255.

Declaration
public static Color Fuchsia { get; }
Property Value
Type Description
Color

G

Gets or sets the green component value of this Color.

Declaration
public byte G { get; set; }
Property Value
Type Description
System.Byte

Gainsboro

Gets a system-defined color with the value R:220 G:220 B:220 A:255.

Declaration
public static Color Gainsboro { get; }
Property Value
Type Description
Color

GhostWhite

Gets a system-defined color with the value R:248 G:248 B:255 A:255.

Declaration
public static Color GhostWhite { get; }
Property Value
Type Description
Color

Gold

Gets a system-defined color with the value R:255 G:215 B:0 A:255.

Declaration
public static Color Gold { get; }
Property Value
Type Description
Color

Goldenrod

Gets a system-defined color with the value R:218 G:165 B:32 A:255.

Declaration
public static Color Goldenrod { get; }
Property Value
Type Description
Color

Gray

Gets a system-defined color with the value R:128 G:128 B:128 A:255.

Declaration
public static Color Gray { get; }
Property Value
Type Description
Color

Green

Gets a system-defined color with the value R:0 G:128 B:0 A:255.

Declaration
public static Color Green { get; }
Property Value
Type Description
Color

GreenYellow

Gets a system-defined color with the value R:173 G:255 B:47 A:255.

Declaration
public static Color GreenYellow { get; }
Property Value
Type Description
Color

Honeydew

Gets a system-defined color with the value R:240 G:255 B:240 A:255.

Declaration
public static Color Honeydew { get; }
Property Value
Type Description
Color

HotPink

Gets a system-defined color with the value R:255 G:105 B:180 A:255.

Declaration
public static Color HotPink { get; }
Property Value
Type Description
Color

IndianRed

Gets a system-defined color with the value R:205 G:92 B:92 A:255.

Declaration
public static Color IndianRed { get; }
Property Value
Type Description
Color

Indigo

Gets a system-defined color with the value R:75 G:0 B:130 A:255.

Declaration
public static Color Indigo { get; }
Property Value
Type Description
Color

Ivory

Gets a system-defined color with the value R:255 G:255 B:240 A:255.

Declaration
public static Color Ivory { get; }
Property Value
Type Description
Color

Khaki

Gets a system-defined color with the value R:240 G:230 B:140 A:255.

Declaration
public static Color Khaki { get; }
Property Value
Type Description
Color

Lavender

Gets a system-defined color with the value R:230 G:230 B:250 A:255.

Declaration
public static Color Lavender { get; }
Property Value
Type Description
Color

LavenderBlush

Gets a system-defined color with the value R:255 G:240 B:245 A:255.

Declaration
public static Color LavenderBlush { get; }
Property Value
Type Description
Color

LawnGreen

Gets a system-defined color with the value R:124 G:252 B:0 A:255.

Declaration
public static Color LawnGreen { get; }
Property Value
Type Description
Color

LemonChiffon

Gets a system-defined color with the value R:255 G:250 B:205 A:255.

Declaration
public static Color LemonChiffon { get; }
Property Value
Type Description
Color

LightBlue

Gets a system-defined color with the value R:173 G:216 B:230 A:255.

Declaration
public static Color LightBlue { get; }
Property Value
Type Description
Color

LightCoral

Gets a system-defined color with the value R:240 G:128 B:128 A:255.

Declaration
public static Color LightCoral { get; }
Property Value
Type Description
Color

LightCyan

Gets a system-defined color with the value R:224 G:255 B:255 A:255.

Declaration
public static Color LightCyan { get; }
Property Value
Type Description
Color

LightGoldenrodYellow

Gets a system-defined color with the value R:250 G:250 B:210 A:255.

Declaration
public static Color LightGoldenrodYellow { get; }
Property Value
Type Description
Color

LightGray

Gets a system-defined color with the value R:211 G:211 B:211 A:255.

Declaration
public static Color LightGray { get; }
Property Value
Type Description
Color

LightGreen

Gets a system-defined color with the value R:144 G:238 B:144 A:255.

Declaration
public static Color LightGreen { get; }
Property Value
Type Description
Color

LightPink

Gets a system-defined color with the value R:255 G:182 B:193 A:255.

Declaration
public static Color LightPink { get; }
Property Value
Type Description
Color

LightSalmon

Gets a system-defined color with the value R:255 G:160 B:122 A:255.

Declaration
public static Color LightSalmon { get; }
Property Value
Type Description
Color

LightSeaGreen

Gets a system-defined color with the value R:32 G:178 B:170 A:255.

Declaration
public static Color LightSeaGreen { get; }
Property Value
Type Description
Color

LightSkyBlue

Gets a system-defined color with the value R:135 G:206 B:250 A:255.

Declaration
public static Color LightSkyBlue { get; }
Property Value
Type Description
Color

LightSlateGray

Gets a system-defined color with the value R:119 G:136 B:153 A:255.

Declaration
public static Color LightSlateGray { get; }
Property Value
Type Description
Color

LightSteelBlue

Gets a system-defined color with the value R:176 G:196 B:222 A:255.

Declaration
public static Color LightSteelBlue { get; }
Property Value
Type Description
Color

LightYellow

Gets a system-defined color with the value R:255 G:255 B:224 A:255.

Declaration
public static Color LightYellow { get; }
Property Value
Type Description
Color

Lime

Gets a system-defined color with the value R:0 G:255 B:0 A:255.

Declaration
public static Color Lime { get; }
Property Value
Type Description
Color

LimeGreen

Gets a system-defined color with the value R:50 G:205 B:50 A:255.

Declaration
public static Color LimeGreen { get; }
Property Value
Type Description
Color

Linen

Gets a system-defined color with the value R:250 G:240 B:230 A:255.

Declaration
public static Color Linen { get; }
Property Value
Type Description
Color

Magenta

Gets a system-defined color with the value R:255 G:0 B:255 A:255.

Declaration
public static Color Magenta { get; }
Property Value
Type Description
Color

Maroon

Gets a system-defined color with the value R:128 G:0 B:0 A:255.

Declaration
public static Color Maroon { get; }
Property Value
Type Description
Color

MediumAquamarine

Gets a system-defined color with the value R:102 G:205 B:170 A:255.

Declaration
public static Color MediumAquamarine { get; }
Property Value
Type Description
Color

MediumBlue

Gets a system-defined color with the value R:0 G:0 B:205 A:255.

Declaration
public static Color MediumBlue { get; }
Property Value
Type Description
Color

MediumOrchid

Gets a system-defined color with the value R:186 G:85 B:211 A:255.

Declaration
public static Color MediumOrchid { get; }
Property Value
Type Description
Color

MediumPurple

Gets a system-defined color with the value R:147 G:112 B:219 A:255.

Declaration
public static Color MediumPurple { get; }
Property Value
Type Description
Color

MediumSeaGreen

Gets a system-defined color with the value R:60 G:179 B:113 A:255.

Declaration
public static Color MediumSeaGreen { get; }
Property Value
Type Description
Color

MediumSlateBlue

Gets a system-defined color with the value R:123 G:104 B:238 A:255.

Declaration
public static Color MediumSlateBlue { get; }
Property Value
Type Description
Color

MediumSpringGreen

Gets a system-defined color with the value R:0 G:250 B:154 A:255.

Declaration
public static Color MediumSpringGreen { get; }
Property Value
Type Description
Color

MediumTurquoise

Gets a system-defined color with the value R:72 G:209 B:204 A:255.

Declaration
public static Color MediumTurquoise { get; }
Property Value
Type Description
Color

MediumVioletRed

Gets a system-defined color with the value R:199 G:21 B:133 A:255.

Declaration
public static Color MediumVioletRed { get; }
Property Value
Type Description
Color

MidnightBlue

Gets a system-defined color with the value R:25 G:25 B:112 A:255.

Declaration
public static Color MidnightBlue { get; }
Property Value
Type Description
Color

MintCream

Gets a system-defined color with the value R:245 G:255 B:250 A:255.

Declaration
public static Color MintCream { get; }
Property Value
Type Description
Color

MistyRose

Gets a system-defined color with the value R:255 G:228 B:225 A:255.

Declaration
public static Color MistyRose { get; }
Property Value
Type Description
Color

Moccasin

Gets a system-defined color with the value R:255 G:228 B:181 A:255.

Declaration
public static Color Moccasin { get; }
Property Value
Type Description
Color

NavajoWhite

Gets a system-defined color with the value R:255 G:222 B:173 A:255.

Declaration
public static Color NavajoWhite { get; }
Property Value
Type Description
Color

Navy

Gets a system-defined color R:0 G:0 B:128 A:255.

Declaration
public static Color Navy { get; }
Property Value
Type Description
Color

OldLace

Gets a system-defined color with the value R:253 G:245 B:230 A:255.

Declaration
public static Color OldLace { get; }
Property Value
Type Description
Color

Olive

Gets a system-defined color with the value R:128 G:128 B:0 A:255.

Declaration
public static Color Olive { get; }
Property Value
Type Description
Color

OliveDrab

Gets a system-defined color with the value R:107 G:142 B:35 A:255.

Declaration
public static Color OliveDrab { get; }
Property Value
Type Description
Color

Orange

Gets a system-defined color with the value R:255 G:165 B:0 A:255.

Declaration
public static Color Orange { get; }
Property Value
Type Description
Color

OrangeRed

Gets a system-defined color with the value R:255 G:69 B:0 A:255.

Declaration
public static Color OrangeRed { get; }
Property Value
Type Description
Color

Orchid

Gets a system-defined color with the value R:218 G:112 B:214 A:255.

Declaration
public static Color Orchid { get; }
Property Value
Type Description
Color

PaleGoldenrod

Gets a system-defined color with the value R:238 G:232 B:170 A:255.

Declaration
public static Color PaleGoldenrod { get; }
Property Value
Type Description
Color

PaleGreen

Gets a system-defined color with the value R:152 G:251 B:152 A:255.

Declaration
public static Color PaleGreen { get; }
Property Value
Type Description
Color

PaleTurquoise

Gets a system-defined color with the value R:175 G:238 B:238 A:255.

Declaration
public static Color PaleTurquoise { get; }
Property Value
Type Description
Color

PaleVioletRed

Gets a system-defined color with the value R:219 G:112 B:147 A:255.

Declaration
public static Color PaleVioletRed { get; }
Property Value
Type Description
Color

PapayaWhip

Gets a system-defined color with the value R:255 G:239 B:213 A:255.

Declaration
public static Color PapayaWhip { get; }
Property Value
Type Description
Color

PeachPuff

Gets a system-defined color with the value R:255 G:218 B:185 A:255.

Declaration
public static Color PeachPuff { get; }
Property Value
Type Description
Color

Peru

Gets a system-defined color with the value R:205 G:133 B:63 A:255.

Declaration
public static Color Peru { get; }
Property Value
Type Description
Color

Pink

Gets a system-defined color with the value R:255 G:192 B:203 A:255.

Declaration
public static Color Pink { get; }
Property Value
Type Description
Color

Plum

Gets a system-defined color with the value R:221 G:160 B:221 A:255.

Declaration
public static Color Plum { get; }
Property Value
Type Description
Color

PowderBlue

Gets a system-defined color with the value R:176 G:224 B:230 A:255.

Declaration
public static Color PowderBlue { get; }
Property Value
Type Description
Color

Purple

Gets a system-defined color with the value R:128 G:0 B:128 A:255.

Declaration
public static Color Purple { get; }
Property Value
Type Description
Color

R

Gets or sets the red component value of this Color.

Declaration
public byte R { get; set; }
Property Value
Type Description
System.Byte

Red

Gets a system-defined color with the value R:255 G:0 B:0 A:255.

Declaration
public static Color Red { get; }
Property Value
Type Description
Color

RosyBrown

Gets a system-defined color with the value R:188 G:143 B:143 A:255.

Declaration
public static Color RosyBrown { get; }
Property Value
Type Description
Color

RoyalBlue

Gets a system-defined color with the value R:65 G:105 B:225 A:255.

Declaration
public static Color RoyalBlue { get; }
Property Value
Type Description
Color

SaddleBrown

Gets a system-defined color with the value R:139 G:69 B:19 A:255.

Declaration
public static Color SaddleBrown { get; }
Property Value
Type Description
Color

Salmon

Gets a system-defined color with the value R:250 G:128 B:114 A:255.

Declaration
public static Color Salmon { get; }
Property Value
Type Description
Color

SandyBrown

Gets a system-defined color with the value R:244 G:164 B:96 A:255.

Declaration
public static Color SandyBrown { get; }
Property Value
Type Description
Color

SeaGreen

Gets a system-defined color with the value R:46 G:139 B:87 A:255.

Declaration
public static Color SeaGreen { get; }
Property Value
Type Description
Color

SeaShell

Gets a system-defined color with the value R:255 G:245 B:238 A:255.

Declaration
public static Color SeaShell { get; }
Property Value
Type Description
Color

Sienna

Gets a system-defined color with the value R:160 G:82 B:45 A:255.

Declaration
public static Color Sienna { get; }
Property Value
Type Description
Color

Silver

Gets a system-defined color with the value R:192 G:192 B:192 A:255.

Declaration
public static Color Silver { get; }
Property Value
Type Description
Color

SkyBlue

Gets a system-defined color with the value R:135 G:206 B:235 A:255.

Declaration
public static Color SkyBlue { get; }
Property Value
Type Description
Color

SlateBlue

Gets a system-defined color with the value R:106 G:90 B:205 A:255.

Declaration
public static Color SlateBlue { get; }
Property Value
Type Description
Color

SlateGray

Gets a system-defined color with the value R:112 G:128 B:144 A:255.

Declaration
public static Color SlateGray { get; }
Property Value
Type Description
Color

Snow

Gets a system-defined color with the value R:255 G:250 B:250 A:255.

Declaration
public static Color Snow { get; }
Property Value
Type Description
Color

SpringGreen

Gets a system-defined color with the value R:0 G:255 B:127 A:255.

Declaration
public static Color SpringGreen { get; }
Property Value
Type Description
Color

SteelBlue

Gets a system-defined color with the value R:70 G:130 B:180 A:255.

Declaration
public static Color SteelBlue { get; }
Property Value
Type Description
Color

Tan

Gets a system-defined color with the value R:210 G:180 B:140 A:255.

Declaration
public static Color Tan { get; }
Property Value
Type Description
Color

Teal

Gets a system-defined color with the value R:0 G:128 B:128 A:255.

Declaration
public static Color Teal { get; }
Property Value
Type Description
Color

Thistle

Gets a system-defined color with the value R:216 G:191 B:216 A:255.

Declaration
public static Color Thistle { get; }
Property Value
Type Description
Color

Tomato

Gets a system-defined color with the value R:255 G:99 B:71 A:255.

Declaration
public static Color Tomato { get; }
Property Value
Type Description
Color

Transparent

Gets a system-defined color with the value R:0 G:0 B:0 A:0.

Declaration
public static Color Transparent { get; }
Property Value
Type Description
Color

Turquoise

Gets a system-defined color with the value R:64 G:224 B:208 A:255.

Declaration
public static Color Turquoise { get; }
Property Value
Type Description
Color

Violet

Gets a system-defined color with the value R:238 G:130 B:238 A:255.

Declaration
public static Color Violet { get; }
Property Value
Type Description
Color

Wheat

Gets a system-defined color with the value R:245 G:222 B:179 A:255.

Declaration
public static Color Wheat { get; }
Property Value
Type Description
Color

White

Gets a system-defined color with the value R:255 G:255 B:255 A:255.

Declaration
public static Color White { get; }
Property Value
Type Description
Color

WhiteSmoke

Gets a system-defined color with the value R:245 G:245 B:245 A:255.

Declaration
public static Color WhiteSmoke { get; }
Property Value
Type Description
Color

X

Gets or sets the red component value of this Color.

Declaration
public byte X { get; set; }
Property Value
Type Description
System.Byte

Y

Gets or sets the green component value of this Color.

Declaration
public byte Y { get; set; }
Property Value
Type Description
System.Byte

Yellow

Gets a system-defined color with the value R:255 G:255 B:0 A:255.

Declaration
public static Color Yellow { get; }
Property Value
Type Description
Color

YellowGreen

Gets a system-defined color with the value R:154 G:205 B:50 A:255.

Declaration
public static Color YellowGreen { get; }
Property Value
Type Description
Color

Z

Gets or sets the blue component value of this Color.

Declaration
public byte Z { get; set; }
Property Value
Type Description
System.Byte

Methods

Darken(Color, Double)

Declaration
public static Color Darken(Color inColor, double inAmount)
Parameters
Type Name Description
Color inColor
System.Double inAmount
Returns
Type Description
Color

Equals(Object)

Test an instance of a color object to see if it is equal to this object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

A color object.

Returns
Type Description
System.Boolean

Equals(Color)

Test a color to see if it is equal to the color in this instance.

Declaration
public bool Equals(Color other)
Parameters
Type Name Description
Color other

A four-component color.

Returns
Type Description
System.Boolean

FromNonPremultiplied(Int32, Int32, Int32, Int32)

Converts a non-premultipled alpha color to a color that contains premultiplied alpha.

Declaration
public static Color FromNonPremultiplied(int r, int g, int b, int a)
Parameters
Type Name Description
System.Int32 r

Red component.

System.Int32 g

Green component.

System.Int32 b

Blue component.

System.Int32 a

Alpha component.

Returns
Type Description
Color

FromNonPremultiplied(Vector4)

Convert a non premultipled color into color data that contains alpha.

Declaration
public static Color FromNonPremultiplied(Vector4 vector)
Parameters
Type Name Description
Vector4 vector

A four-component color.

Returns
Type Description
Color

GetHashCode()

Serves as a hash function for a particular type.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Lerp(Color, Color, Single)

Linearly interpolate a color.

Declaration
public static Color Lerp(Color value1, Color value2, float amount)
Parameters
Type Name Description
Color value1

A four-component color.

Color value2

A four-component color.

System.Single amount

Interpolation factor.

Returns
Type Description
Color

Lighten(Color, Double)

Declaration
public static Color Lighten(Color inColor, double inAmount)
Parameters
Type Name Description
Color inColor
System.Double inAmount
Returns
Type Description
Color

Multiply(Color, Single)

Multiply each color component by the scale factor.

Declaration
public static Color Multiply(Color value, float scale)
Parameters
Type Name Description
Color value

The source, four-component color.

System.Single scale

The scale factor.

Returns
Type Description
Color

ToGray()

Declaration
public Color ToGray()
Returns
Type Description
Color

ToString()

Gets a string representation of this object.

Declaration
public override string ToString()
Returns
Type Description
System.String

ToVector3()

Gets a three-component vector representation for this object.

Declaration
public Vector3 ToVector3()
Returns
Type Description
Vector3

ToVector4()

Gets a four-component vector representation for this object.

Declaration
public Vector4 ToVector4()
Returns
Type Description
Vector4

Operators

Addition(Color, Color)

Declaration
public static Color operator +(Color value, Color other)
Parameters
Type Name Description
Color value
Color other
Returns
Type Description
Color

Equality(Color, Color)

Equality operator.

Declaration
public static bool operator ==(Color a, Color b)
Parameters
Type Name Description
Color a

A four-component color.

Color b

A four-component color.

Returns
Type Description
System.Boolean

Implicit(Color to Vector3)

Declaration
public static implicit operator Vector3(Color v)
Parameters
Type Name Description
Color v
Returns
Type Description
Vector3

Implicit(Color to Vector4)

Declaration
public static implicit operator Vector4(Color v)
Parameters
Type Name Description
Color v
Returns
Type Description
Vector4

Implicit(Vector3 to Color)

Declaration
public static implicit operator Color(Vector3 v)
Parameters
Type Name Description
Vector3 v
Returns
Type Description
Color

Implicit(Vector4 to Color)

Declaration
public static implicit operator Color(Vector4 v)
Parameters
Type Name Description
Vector4 v
Returns
Type Description
Color

Inequality(Color, Color)

Equality operator for Testing two color objects to see if they are equal.

Declaration
public static bool operator !=(Color a, Color b)
Parameters
Type Name Description
Color a

A four-component color.

Color b

A four-component color.

Returns
Type Description
System.Boolean

Multiply(Color, Single)

Multiply operator.

Declaration
public static Color operator *(Color value, float scale)
Parameters
Type Name Description
Color value

A four-component color

System.Single scale

Scale factor.

Returns
Type Description
Color

Multiply(Color, Color)

Multiply operator.

Declaration
public static Color operator *(Color value, Color other)
Parameters
Type Name Description
Color value

A four-component color

Color other

Multiplied color.

Returns
Type Description
Color

Extension Methods

ColorExtensions.ColorToHSV(Color)
ColorExtensions.ColorToHSVDX11(Color)
ColorExtensions.HueDistance(Color, Single)
ColorExtensions.HueDistance(Color, Color)
ColorExtensions.Shade(Color, Single)
ColorExtensions.Tint(Color, Single)
ColorExtensions.Alpha(Color, Single)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾