Struct Color
Represents a 32-bit color.
Implements
Inherited Members
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public struct Color : IEquatable<Color>
Constructors
Color(byte)
Initializes a new instance of the Color struct.
Declaration
public Color(byte v)
Parameters
Type | Name | Description |
---|---|---|
byte | v | Grayscale tone. |
Color(byte, byte, byte, byte)
Initializes a new instance of the Color struct.
Declaration
public Color(byte r, byte g, byte b, byte a = 255)
Parameters
Type | Name | Description |
---|---|---|
byte | r | Red component. |
byte | g | Green component. |
byte | b | Blue component. |
byte | a | Alpha component. |
Color(float)
Initializes a new instance of the Color struct.
Declaration
public Color(float v)
Parameters
Type | Name | Description |
---|---|---|
float | v | Grayscale tone in the [0, 1] range. |
Color(float, float, float, float)
Initializes a new instance of the Color struct.
Declaration
public Color(float r, float g, float b, float a = 1)
Parameters
Type | Name | Description |
---|---|---|
float | r | Red component in the [0, 1] range. |
float | g | Green component in the [0, 1] range. |
float | b | Blue component in the [0, 1] range. |
float | a | Alpha component in the [0, 1] range. |
Color(string)
Initializes a new instance of the Color struct.
Declaration
public Color(string hex)
Parameters
Type | Name | Description |
---|---|---|
string | hex | hexadecimal color code. |
Color(uint)
Initializes a new instance of the Color struct.
Declaration
public Color(uint packetValue)
Parameters
Type | Name | Description |
---|---|---|
uint | packetValue | The packet value. |
Fields
A
Alpha component.
Declaration
public byte A
Field Value
Type | Description |
---|---|
byte |
B
Blue component.
Declaration
public byte B
Field Value
Type | Description |
---|---|
byte |
G
Green component.
Declaration
public byte G
Field Value
Type | Description |
---|---|
byte |
R
Red component.
Declaration
public byte R
Field Value
Type | Description |
---|---|
byte |
Properties
AliceBlue
Gets the alice blue.
Declaration
public static Color AliceBlue { get; }
Property Value
Type | Description |
---|---|
Color |
AntiqueWhite
Gets the antique white.
Declaration
public static Color AntiqueWhite { get; }
Property Value
Type | Description |
---|---|
Color |
Aqua
Gets the aqua.
Declaration
public static Color Aqua { get; }
Property Value
Type | Description |
---|---|
Color |
Aquamarine
Gets the aquamarine.
Declaration
public static Color Aquamarine { get; }
Property Value
Type | Description |
---|---|
Color |
Azure
Gets the azure.
Declaration
public static Color Azure { get; }
Property Value
Type | Description |
---|---|
Color |
Beige
Gets the beige.
Declaration
public static Color Beige { get; }
Property Value
Type | Description |
---|---|
Color |
Bisque
Gets the bisque.
Declaration
public static Color Bisque { get; }
Property Value
Type | Description |
---|---|
Color |
Black
Gets the black.
Declaration
public static Color Black { get; }
Property Value
Type | Description |
---|---|
Color |
BlanchedAlmond
Gets the blanched almond.
Declaration
public static Color BlanchedAlmond { get; }
Property Value
Type | Description |
---|---|
Color |
Blue
Gets the blue.
Declaration
public static Color Blue { get; }
Property Value
Type | Description |
---|---|
Color |
BlueViolet
Gets the blue violet.
Declaration
public static Color BlueViolet { get; }
Property Value
Type | Description |
---|---|
Color |
Brown
Gets the brown.
Declaration
public static Color Brown { get; }
Property Value
Type | Description |
---|---|
Color |
BurlyWood
Gets the burly wood.
Declaration
public static Color BurlyWood { get; }
Property Value
Type | Description |
---|---|
Color |
CadetBlue
Gets the cadet blue.
Declaration
public static Color CadetBlue { get; }
Property Value
Type | Description |
---|---|
Color |
Chartreuse
Gets the chartreuse.
Declaration
public static Color Chartreuse { get; }
Property Value
Type | Description |
---|---|
Color |
Chocolate
Gets the chocolate.
Declaration
public static Color Chocolate { get; }
Property Value
Type | Description |
---|---|
Color |
Coral
Gets the coral.
Declaration
public static Color Coral { get; }
Property Value
Type | Description |
---|---|
Color |
CornflowerBlue
Gets the cornflower blue.
Declaration
public static Color CornflowerBlue { get; }
Property Value
Type | Description |
---|---|
Color |
Cornsilk
Gets the cornsilk.
Declaration
public static Color Cornsilk { get; }
Property Value
Type | Description |
---|---|
Color |
Crimson
Gets the crimson.
Declaration
public static Color Crimson { get; }
Property Value
Type | Description |
---|---|
Color |
Cyan
Gets the cyan.
Declaration
public static Color Cyan { get; }
Property Value
Type | Description |
---|---|
Color |
DarkBlue
Gets the dark blue.
Declaration
public static Color DarkBlue { get; }
Property Value
Type | Description |
---|---|
Color |
DarkCyan
Gets the dark cyan.
Declaration
public static Color DarkCyan { get; }
Property Value
Type | Description |
---|---|
Color |
DarkGoldenrod
Gets the dark goldenrod.
Declaration
public static Color DarkGoldenrod { get; }
Property Value
Type | Description |
---|---|
Color |
DarkGray
Gets the dark gray.
Declaration
public static Color DarkGray { get; }
Property Value
Type | Description |
---|---|
Color |
DarkGreen
Gets the dark green.
Declaration
public static Color DarkGreen { get; }
Property Value
Type | Description |
---|---|
Color |
DarkKhaki
Gets the dark khaki.
Declaration
public static Color DarkKhaki { get; }
Property Value
Type | Description |
---|---|
Color |
DarkMagenta
Gets the dark magenta.
Declaration
public static Color DarkMagenta { get; }
Property Value
Type | Description |
---|---|
Color |
DarkOliveGreen
Gets the dark olive green.
Declaration
public static Color DarkOliveGreen { get; }
Property Value
Type | Description |
---|---|
Color |
DarkOrange
Gets the dark orange.
Declaration
public static Color DarkOrange { get; }
Property Value
Type | Description |
---|---|
Color |
DarkOrchid
Gets the dark orchid.
Declaration
public static Color DarkOrchid { get; }
Property Value
Type | Description |
---|---|
Color |
DarkRed
Gets the dark red.
Declaration
public static Color DarkRed { get; }
Property Value
Type | Description |
---|---|
Color |
DarkSalmon
Gets the dark salmon.
Declaration
public static Color DarkSalmon { get; }
Property Value
Type | Description |
---|---|
Color |
DarkSeaGreen
Gets the dark sea green.
Declaration
public static Color DarkSeaGreen { get; }
Property Value
Type | Description |
---|---|
Color |
DarkSlateBlue
Gets the dark slate blue.
Declaration
public static Color DarkSlateBlue { get; }
Property Value
Type | Description |
---|---|
Color |
DarkSlateGray
Gets the dark slate gray.
Declaration
public static Color DarkSlateGray { get; }
Property Value
Type | Description |
---|---|
Color |
DarkTurquoise
Gets the dark turquoise.
Declaration
public static Color DarkTurquoise { get; }
Property Value
Type | Description |
---|---|
Color |
DarkViolet
Gets the dark violet.
Declaration
public static Color DarkViolet { get; }
Property Value
Type | Description |
---|---|
Color |
DeepPink
Gets the deep pink.
Declaration
public static Color DeepPink { get; }
Property Value
Type | Description |
---|---|
Color |
DeepSkyBlue
Gets the deep sky blue.
Declaration
public static Color DeepSkyBlue { get; }
Property Value
Type | Description |
---|---|
Color |
DimGray
Gets the dim gray.
Declaration
public static Color DimGray { get; }
Property Value
Type | Description |
---|---|
Color |
DodgerBlue
Gets the dodger blue.
Declaration
public static Color DodgerBlue { get; }
Property Value
Type | Description |
---|---|
Color |
Firebrick
Gets the firebrick.
Declaration
public static Color Firebrick { get; }
Property Value
Type | Description |
---|---|
Color |
FloralWhite
Gets the floral white.
Declaration
public static Color FloralWhite { get; }
Property Value
Type | Description |
---|---|
Color |
ForestGreen
Gets the forest green.
Declaration
public static Color ForestGreen { get; }
Property Value
Type | Description |
---|---|
Color |
Fuchsia
Gets the fuchsia.
Declaration
public static Color Fuchsia { get; }
Property Value
Type | Description |
---|---|
Color |
Gainsboro
Gets the gainsboro.
Declaration
public static Color Gainsboro { get; }
Property Value
Type | Description |
---|---|
Color |
GhostWhite
Gets the ghost white.
Declaration
public static Color GhostWhite { get; }
Property Value
Type | Description |
---|---|
Color |
Gold
Gets the gold.
Declaration
public static Color Gold { get; }
Property Value
Type | Description |
---|---|
Color |
Goldenrod
Gets the goldenrod.
Declaration
public static Color Goldenrod { get; }
Property Value
Type | Description |
---|---|
Color |
Gray
Gets the gray.
Declaration
public static Color Gray { get; }
Property Value
Type | Description |
---|---|
Color |
Green
Gets the green.
Declaration
public static Color Green { get; }
Property Value
Type | Description |
---|---|
Color |
GreenYellow
Gets the green yellow.
Declaration
public static Color GreenYellow { get; }
Property Value
Type | Description |
---|---|
Color |
Honeydew
Gets the honeydew.
Declaration
public static Color Honeydew { get; }
Property Value
Type | Description |
---|---|
Color |
HotPink
Gets the hot pink.
Declaration
public static Color HotPink { get; }
Property Value
Type | Description |
---|---|
Color |
IndianRed
Gets the indian red.
Declaration
public static Color IndianRed { get; }
Property Value
Type | Description |
---|---|
Color |
Indigo
Gets the indigo.
Declaration
public static Color Indigo { get; }
Property Value
Type | Description |
---|---|
Color |
InherentColor
Gets the inherent color, discarding its luminance.
Declaration
public Color InherentColor { get; }
Property Value
Type | Description |
---|---|
Color |
this[int]
Gets or sets the byte at the specified index.
Declaration
public byte this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | index | Element index. |
Property Value
Type | Description |
---|---|
byte | The result. |
Ivory
Gets the ivory.
Declaration
public static Color Ivory { get; }
Property Value
Type | Description |
---|---|
Color |
Khaki
Gets the khaki.
Declaration
public static Color Khaki { get; }
Property Value
Type | Description |
---|---|
Color |
Lavender
Gets the lavender.
Declaration
public static Color Lavender { get; }
Property Value
Type | Description |
---|---|
Color |
LavenderBlush
Gets the lavender blush.
Declaration
public static Color LavenderBlush { get; }
Property Value
Type | Description |
---|---|
Color |
LawnGreen
Gets the lawn green.
Declaration
public static Color LawnGreen { get; }
Property Value
Type | Description |
---|---|
Color |
LemonChiffon
Gets the lemon chiffon.
Declaration
public static Color LemonChiffon { get; }
Property Value
Type | Description |
---|---|
Color |
LightBlue
Gets the light blue.
Declaration
public static Color LightBlue { get; }
Property Value
Type | Description |
---|---|
Color |
LightCoral
Gets the light coral.
Declaration
public static Color LightCoral { get; }
Property Value
Type | Description |
---|---|
Color |
LightCyan
Gets the light cyan.
Declaration
public static Color LightCyan { get; }
Property Value
Type | Description |
---|---|
Color |
LightGoldenrodYellow
Gets the light goldenrod yellow.
Declaration
public static Color LightGoldenrodYellow { get; }
Property Value
Type | Description |
---|---|
Color |
LightGray
Gets the light gray.
Declaration
public static Color LightGray { get; }
Property Value
Type | Description |
---|---|
Color |
LightGreen
Gets the light green.
Declaration
public static Color LightGreen { get; }
Property Value
Type | Description |
---|---|
Color |
LightPink
Gets the light pink.
Declaration
public static Color LightPink { get; }
Property Value
Type | Description |
---|---|
Color |
LightSalmon
Gets the light salmon.
Declaration
public static Color LightSalmon { get; }
Property Value
Type | Description |
---|---|
Color |
LightSeaGreen
Gets the light sea green.
Declaration
public static Color LightSeaGreen { get; }
Property Value
Type | Description |
---|---|
Color |
LightSkyBlue
Gets the light sky blue.
Declaration
public static Color LightSkyBlue { get; }
Property Value
Type | Description |
---|---|
Color |
LightSlateGray
Gets the light slate gray.
Declaration
public static Color LightSlateGray { get; }
Property Value
Type | Description |
---|---|
Color |
LightSteelBlue
Gets the light steel blue.
Declaration
public static Color LightSteelBlue { get; }
Property Value
Type | Description |
---|---|
Color |
LightYellow
Gets the light yellow.
Declaration
public static Color LightYellow { get; }
Property Value
Type | Description |
---|---|
Color |
Lime
Gets the lime.
Declaration
public static Color Lime { get; }
Property Value
Type | Description |
---|---|
Color |
LimeGreen
Gets the lime green.
Declaration
public static Color LimeGreen { get; }
Property Value
Type | Description |
---|---|
Color |
Linen
Gets the linen.
Declaration
public static Color Linen { get; }
Property Value
Type | Description |
---|---|
Color |
Luminance
Gets the color luminance.
Declaration
public float Luminance { get; }
Property Value
Type | Description |
---|---|
float |
Magenta
Gets the magenta.
Declaration
public static Color Magenta { get; }
Property Value
Type | Description |
---|---|
Color |
Maroon
Gets the maroon.
Declaration
public static Color Maroon { get; }
Property Value
Type | Description |
---|---|
Color |
MediumAquamarine
Gets the medium aquamarine.
Declaration
public static Color MediumAquamarine { get; }
Property Value
Type | Description |
---|---|
Color |
MediumBlue
Gets the medium blue.
Declaration
public static Color MediumBlue { get; }
Property Value
Type | Description |
---|---|
Color |
MediumOrchid
Gets the medium orchid.
Declaration
public static Color MediumOrchid { get; }
Property Value
Type | Description |
---|---|
Color |
MediumPurple
Gets the medium purple.
Declaration
public static Color MediumPurple { get; }
Property Value
Type | Description |
---|---|
Color |
MediumSeaGreen
Gets the medium sea green.
Declaration
public static Color MediumSeaGreen { get; }
Property Value
Type | Description |
---|---|
Color |
MediumSlateBlue
Gets the medium slate blue.
Declaration
public static Color MediumSlateBlue { get; }
Property Value
Type | Description |
---|---|
Color |
MediumSpringGreen
Gets the medium spring green.
Declaration
public static Color MediumSpringGreen { get; }
Property Value
Type | Description |
---|---|
Color |
MediumTurquoise
Gets the medium turquoise.
Declaration
public static Color MediumTurquoise { get; }
Property Value
Type | Description |
---|---|
Color |
MediumVioletRed
Gets the medium violet red.
Declaration
public static Color MediumVioletRed { get; }
Property Value
Type | Description |
---|---|
Color |
MidnightBlue
Gets the midnight blue.
Declaration
public static Color MidnightBlue { get; }
Property Value
Type | Description |
---|---|
Color |
MintCream
Gets the mint cream.
Declaration
public static Color MintCream { get; }
Property Value
Type | Description |
---|---|
Color |
MistyRose
Gets the misty rose.
Declaration
public static Color MistyRose { get; }
Property Value
Type | Description |
---|---|
Color |
Moccasin
Gets the moccasin.
Declaration
public static Color Moccasin { get; }
Property Value
Type | Description |
---|---|
Color |
NavajoWhite
Gets the navajo white.
Declaration
public static Color NavajoWhite { get; }
Property Value
Type | Description |
---|---|
Color |
Navy
Gets the navy.
Declaration
public static Color Navy { get; }
Property Value
Type | Description |
---|---|
Color |
OldLace
Gets the old lace.
Declaration
public static Color OldLace { get; }
Property Value
Type | Description |
---|---|
Color |
Olive
Gets the olive.
Declaration
public static Color Olive { get; }
Property Value
Type | Description |
---|---|
Color |
OliveDrab
Gets the olive drab.
Declaration
public static Color OliveDrab { get; }
Property Value
Type | Description |
---|---|
Color |
Orange
Gets the orange.
Declaration
public static Color Orange { get; }
Property Value
Type | Description |
---|---|
Color |
OrangeRed
Gets the orange red.
Declaration
public static Color OrangeRed { get; }
Property Value
Type | Description |
---|---|
Color |
Orchid
Gets the orchid.
Declaration
public static Color Orchid { get; }
Property Value
Type | Description |
---|---|
Color |
PaleGoldenrod
Gets the pale goldenrod.
Declaration
public static Color PaleGoldenrod { get; }
Property Value
Type | Description |
---|---|
Color |
PaleGreen
Gets the pale green.
Declaration
public static Color PaleGreen { get; }
Property Value
Type | Description |
---|---|
Color |
PaleTurquoise
Gets the pale turquoise.
Declaration
public static Color PaleTurquoise { get; }
Property Value
Type | Description |
---|---|
Color |
PaleVioletRed
Gets the pale violet red.
Declaration
public static Color PaleVioletRed { get; }
Property Value
Type | Description |
---|---|
Color |
PapayaWhip
Gets the papaya whip.
Declaration
public static Color PapayaWhip { get; }
Property Value
Type | Description |
---|---|
Color |
PeachPuff
Gets the peach puff.
Declaration
public static Color PeachPuff { get; }
Property Value
Type | Description |
---|---|
Color |
Peru
Gets the peru.
Declaration
public static Color Peru { get; }
Property Value
Type | Description |
---|---|
Color |
Pink
Gets the pink.
Declaration
public static Color Pink { get; }
Property Value
Type | Description |
---|---|
Color |
Plum
Gets the plum.
Declaration
public static Color Plum { get; }
Property Value
Type | Description |
---|---|
Color |
PowderBlue
Gets the powder blue.
Declaration
public static Color PowderBlue { get; }
Property Value
Type | Description |
---|---|
Color |
Purple
Gets the purple.
Declaration
public static Color Purple { get; }
Property Value
Type | Description |
---|---|
Color |
Red
Gets the red.
Declaration
public static Color Red { get; }
Property Value
Type | Description |
---|---|
Color |
RosyBrown
Gets the rosy brown.
Declaration
public static Color RosyBrown { get; }
Property Value
Type | Description |
---|---|
Color |
RoyalBlue
Gets the royal blue.
Declaration
public static Color RoyalBlue { get; }
Property Value
Type | Description |
---|---|
Color |
SaddleBrown
Gets the saddle brown.
Declaration
public static Color SaddleBrown { get; }
Property Value
Type | Description |
---|---|
Color |
Salmon
Gets the salmon.
Declaration
public static Color Salmon { get; }
Property Value
Type | Description |
---|---|
Color |
SandyBrown
Gets the sandy brown.
Declaration
public static Color SandyBrown { get; }
Property Value
Type | Description |
---|---|
Color |
SeaGreen
Gets the sea green.
Declaration
public static Color SeaGreen { get; }
Property Value
Type | Description |
---|---|
Color |
SeaShell
Gets the sea shell.
Declaration
public static Color SeaShell { get; }
Property Value
Type | Description |
---|---|
Color |
Sienna
Gets the sienna.
Declaration
public static Color Sienna { get; }
Property Value
Type | Description |
---|---|
Color |
Silver
Gets the silver.
Declaration
public static Color Silver { get; }
Property Value
Type | Description |
---|---|
Color |
SkyBlue
Gets the sky blue.
Declaration
public static Color SkyBlue { get; }
Property Value
Type | Description |
---|---|
Color |
SlateBlue
Gets the slate blue.
Declaration
public static Color SlateBlue { get; }
Property Value
Type | Description |
---|---|
Color |
SlateGray
Gets the slate gray.
Declaration
public static Color SlateGray { get; }
Property Value
Type | Description |
---|---|
Color |
Snow
Gets the snow.
Declaration
public static Color Snow { get; }
Property Value
Type | Description |
---|---|
Color |
SpringGreen
Gets the spring green.
Declaration
public static Color SpringGreen { get; }
Property Value
Type | Description |
---|---|
Color |
SteelBlue
Gets the steel blue.
Declaration
public static Color SteelBlue { get; }
Property Value
Type | Description |
---|---|
Color |
Tan
Gets the tan.
Declaration
public static Color Tan { get; }
Property Value
Type | Description |
---|---|
Color |
Teal
Gets the teal.
Declaration
public static Color Teal { get; }
Property Value
Type | Description |
---|---|
Color |
Thistle
Gets the thistle.
Declaration
public static Color Thistle { get; }
Property Value
Type | Description |
---|---|
Color |
Tomato
Gets the tomato.
Declaration
public static Color Tomato { get; }
Property Value
Type | Description |
---|---|
Color |
Transparent
Gets the transparent.
Declaration
public static Color Transparent { get; }
Property Value
Type | Description |
---|---|
Color |
Turquoise
Gets the turquoise.
Declaration
public static Color Turquoise { get; }
Property Value
Type | Description |
---|---|
Color |
Violet
Gets the violet.
Declaration
public static Color Violet { get; }
Property Value
Type | Description |
---|---|
Color |
Wheat
Gets the wheat.
Declaration
public static Color Wheat { get; }
Property Value
Type | Description |
---|---|
Color |
White
Gets the white.
Declaration
public static Color White { get; }
Property Value
Type | Description |
---|---|
Color |
WhiteSmoke
Gets the white smoke.
Declaration
public static Color WhiteSmoke { get; }
Property Value
Type | Description |
---|---|
Color |
Yellow
Gets the yellow.
Declaration
public static Color Yellow { get; }
Property Value
Type | Description |
---|---|
Color |
YellowGreen
Gets the yellow green.
Declaration
public static Color YellowGreen { get; }
Property Value
Type | Description |
---|---|
Color |
Methods
Equals(Color)
Equalses the specified other.
Declaration
public bool Equals(Color other)
Parameters
Type | Name | Description |
---|---|---|
Color | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Returns
Overrides
FromHex(string)
Creates a color from Hex coded string.
Declaration
public static Color FromHex(string colorcode)
Parameters
Type | Name | Description |
---|---|---|
string | colorcode | Hex format #AARRGGBB or #RRGGBB. |
Returns
Type | Description |
---|---|
Color | An ARGB color. |
FromHsl(float, float, float, float)
Creates a color from HSL components.
Declaration
public static Color FromHsl(float h, float s, float l, float a = 1)
Parameters
Type | Name | Description |
---|---|---|
float | h | Hue component in the [0, 1] range. |
float | s | Saturation component in the [0, 1] range. |
float | l | Luminance component in the [0, 1] range. |
float | a | Alpha component in the [0, 1] range. |
Returns
Type | Description |
---|---|
Color | An ARGB color. |
FromHsv(float, float, float, float)
Creates a color from HSV components.
Declaration
public static Color FromHsv(float h, float s, float v, float a = 1)
Parameters
Type | Name | Description |
---|---|---|
float | h | Hue component in the [0, 1] range. |
float | s | Saturation component in the [0, 1] range. |
float | v | Value component in the [0, 1] range. |
float | a | Alpha component in the [0, 1] range. |
Returns
Type | Description |
---|---|
Color | An ARGB color. |
FromVector3(ref Vector3)
Converts Vector3 to Color.
Declaration
public static Color FromVector3(ref Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | Vector3 with color. |
Returns
Type | Description |
---|---|
Color | The color. |
FromVector3(ref Vector4, out Color)
Converts Vector4 to Color.
Declaration
public static void FromVector3(ref Vector4 vector, out Color color)
Parameters
FromVector4(ref Vector4)
Converts Vector4 to Color.
Declaration
public static Color FromVector4(ref Vector4 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | Vector4 with color. |
Returns
Type | Description |
---|---|
Color | The color. |
FromVector4(ref Vector4, out Color)
Converts Vector4 to Color.
Declaration
public static void FromVector4(ref Vector4 vector, out Color color)
Parameters
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Lerp(Color, Color, float)
Lerps the specified value1.
Declaration
public static Color Lerp(Color value1, Color value2, float amount)
Parameters
Returns
Type | Description |
---|---|
Color | The result. |
Lerp(ref Color, ref Color, float)
Lerps the specified value1.
Declaration
public static Color Lerp(ref Color value1, ref Color value2, float amount)
Parameters
Returns
Type | Description |
---|---|
Color | The result. |
ToHexColorCode()
To the hexadecimal code.
Declaration
public string ToHexColorCode()
Returns
Type | Description |
---|---|
string | Color as hexadecimal code with the format #RGBA. |
ToInt()
To int value.
Declaration
public int ToInt()
Returns
Type | Description |
---|---|
int | Color as int value. |
ToVector3()
Converts to a Vector3.
Declaration
public Vector3 ToVector3()
Returns
Type | Description |
---|---|
Vector3 | Color as a Vector3. |
ToVector3(ref Vector3)
Converts to a Vector3.
Declaration
public void ToVector3(ref Vector3 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vector | Color as a Vector3. |
ToVector4()
Converts to a Vector4.
Declaration
public Vector4 ToVector4()
Returns
Type | Description |
---|---|
Vector4 | Color as a Vector4. |
ToVector4(out Vector4)
Converts to a Vector4.
Declaration
public void ToVector4(out Vector4 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | Color as a Vector4. |
Operators
operator +(Color, Color)
Implements the operator +.
Declaration
public static Color operator +(Color a, Color b)
Parameters
Returns
Type | Description |
---|---|
Color | The result of the operator. |
operator /(Color, float)
Implements the operator /.
Declaration
public static Color operator /(Color a, float b)
Parameters
Returns
Type | Description |
---|---|
Color | The result of the operator. |
operator ==(Color, Color)
Implements the operator ==.
Declaration
public static bool operator ==(Color lhs, Color rhs)
Parameters
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(Color, Color)
Implements the operator !=.
Declaration
public static bool operator !=(Color lhs, Color rhs)
Parameters
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator *(Color, Color)
Implements the operator *.
Declaration
public static Color operator *(Color a, Color b)
Parameters
Returns
Type | Description |
---|---|
Color | The result of the operator. |
operator *(Color, float)
Implements the operator *.
Declaration
public static Color operator *(Color a, float b)
Parameters
Returns
Type | Description |
---|---|
Color | The result of the operator. |
operator *(float, Color)
Implements the operator *.
Declaration
public static Color operator *(float b, Color a)
Parameters
Returns
Type | Description |
---|---|
Color | The result of the operator. |
operator -(Color, Color)
Implements the operator -.
Declaration
public static Color operator -(Color a, Color b)
Parameters
Returns
Type | Description |
---|---|
Color | The result of the operator. |