Table of Contents

Struct Color

Namespace
SampSharp.Entities.SAMP
Assembly
SampSharp.OpenMp.Entities.dll

Represents a hexadecimal color.

public struct Color
Inherited Members

Constructors

Color(byte, byte, byte)

Initializes a new instance of the Color struct.

public Color(byte r, byte g, byte b)

Parameters

r byte

The red value of this Color.

g byte

The green value of this Color.

b byte

The blue value of this Color.

Color(byte, byte, byte, byte)

Initializes a new instance of the Color struct.

public Color(byte r, byte g, byte b, byte a)

Parameters

r byte

The red value of this Color.

g byte

The green value of this Color.

b byte

The blue value of this Color.

a byte

The alpha value of this Color.

Color(byte, byte, byte, float)

Initializes a new instance of the Color struct.

public Color(byte r, byte g, byte b, float a)

Parameters

r byte

The red value of this Color.

g byte

The green value of this Color.

b byte

The blue value of this Color.

a float

The alpha value of this Color.

Color(int)

Initializes a new instance of the Color struct.

public Color(int color)

Parameters

color int

The Color values to use for this Color.

Color(int, int, int)

Initializes a new instance of the Color struct.

public Color(int r, int g, int b)

Parameters

r int

The red value of this Color.

g int

The green value of this Color.

b int

The blue value of this Color.

Color(int, int, int, int)

Initializes a new instance of the Color struct.

public Color(int r, int g, int b, int a)

Parameters

r int

The red value of this Color.

g int

The green value of this Color.

b int

The blue value of this Color.

a int

The alpha value of this Color.

Color(float, float, float)

Initializes a new instance of the Color struct.

public Color(float r, float g, float b)

Parameters

r float

The red value of this Color.

g float

The green value of this Color.

b float

The blue value of this Color.

Color(float, float, float, float)

Initializes a new instance of the Color struct.

public Color(float r, float g, float b, float a)

Parameters

r float

The red value of this Color.

g float

The green value of this Color.

b float

The blue value of this Color.

a float

The alpha value of this Color.

Color(uint)

Initializes a new instance of the Color struct.

public Color(uint color)

Parameters

color uint

The Color values to use for this Color.

Properties

A

Gets or sets the alpha value of this Color.

public byte A { readonly get; set; }

Property Value

byte

AliceBlue

Gets a system-defined color that has an ARGB value of #FFF0F8FF.

public static Color AliceBlue { get; }

Property Value

Color

AntiqueWhite

Gets a system-defined color that has an ARGB value of #FFFAEBD7.

public static Color AntiqueWhite { get; }

Property Value

Color

Aqua

Gets a system-defined color that has an ARGB value of #FF00FFFF.

public static Color Aqua { get; }

Property Value

Color

Aquamarine

Gets a system-defined color that has an ARGB value of #FF7FFFD4.

public static Color Aquamarine { get; }

Property Value

Color

Azure

Gets a system-defined color that has an ARGB value of #FFF0FFFF.

public static Color Azure { get; }

Property Value

Color

B

Gets or sets the blue value of this Color.

public byte B { readonly get; set; }

Property Value

byte

Beige

Gets a system-defined color that has an ARGB value of #FFF5F5DC.

public static Color Beige { get; }

Property Value

Color

Bisque

Gets a system-defined color that has an ARGB value of #FFFFE4C4.

public static Color Bisque { get; }

Property Value

Color

Black

Gets a system-defined color that has an ARGB value of #FF000000.

public static Color Black { get; }

Property Value

Color

BlanchedAlmond

Gets a system-defined color that has an ARGB value of #FFFFEBCD.

public static Color BlanchedAlmond { get; }

Property Value

Color

Blue

Gets a system-defined color that has an ARGB value of #FF0000FF.

public static Color Blue { get; }

Property Value

Color

BlueViolet

Gets a system-defined color that has an ARGB value of #FF8A2BE2.

public static Color BlueViolet { get; }

Property Value

Color

Brightness

Gets the brightness of this Color.

public float Brightness { get; }

Property Value

float

Brown

Gets a system-defined color that has an ARGB value of #FFA52A2A.

public static Color Brown { get; }

Property Value

Color

BurlyWood

Gets a system-defined color that has an ARGB value of #FFDEB887.

public static Color BurlyWood { get; }

Property Value

Color

CadetBlue

Gets a system-defined color that has an ARGB value of #FF5F9EA0.

public static Color CadetBlue { get; }

Property Value

Color

Chartreuse

Gets a system-defined color that has an ARGB value of #FF7FFF00.

public static Color Chartreuse { get; }

Property Value

Color

Chocolate

Gets a system-defined color that has an ARGB value of #FFD2691E.

public static Color Chocolate { get; }

Property Value

Color

Coral

Gets a system-defined color that has an ARGB value of #FFFF7F50.

public static Color Coral { get; }

Property Value

Color

CornflowerBlue

Gets a system-defined color that has an ARGB value of #FF6495ED.

public static Color CornflowerBlue { get; }

Property Value

Color

Cornsilk

Gets a system-defined color that has an ARGB value of #FFFFF8DC.

public static Color Cornsilk { get; }

Property Value

Color

Crimson

Gets a system-defined color that has an ARGB value of #FFDC143C.

public static Color Crimson { get; }

Property Value

Color

Cyan

Gets a system-defined color that has an ARGB value of #FF00FFFF.

public static Color Cyan { get; }

Property Value

Color

DarkBlue

Gets a system-defined color that has an ARGB value of #FF00008B.

public static Color DarkBlue { get; }

Property Value

Color

DarkCyan

Gets a system-defined color that has an ARGB value of #FF008B8B.

public static Color DarkCyan { get; }

Property Value

Color

DarkGoldenrod

Gets a system-defined color that has an ARGB value of #FFB8860B.

public static Color DarkGoldenrod { get; }

Property Value

Color

DarkGray

Gets a system-defined color that has an ARGB value of #FFA9A9A9.

public static Color DarkGray { get; }

Property Value

Color

DarkGreen

Gets a system-defined color that has an ARGB value of #FF006400.

public static Color DarkGreen { get; }

Property Value

Color

DarkKhaki

Gets a system-defined color that has an ARGB value of #FFBDB76B.

public static Color DarkKhaki { get; }

Property Value

Color

DarkMagenta

Gets a system-defined color that has an ARGB value of #FF8B008B.

public static Color DarkMagenta { get; }

Property Value

Color

DarkOliveGreen

Gets a system-defined color that has an ARGB value of #FF556B2F.

public static Color DarkOliveGreen { get; }

Property Value

Color

DarkOrange

Gets a system-defined color that has an ARGB value of #FFFF8C00.

public static Color DarkOrange { get; }

Property Value

Color

DarkOrchid

Gets a system-defined color that has an ARGB value of #FF9932CC.

public static Color DarkOrchid { get; }

Property Value

Color

DarkRed

Gets a system-defined color that has an ARGB value of #FF8B0000.

public static Color DarkRed { get; }

Property Value

Color

DarkSalmon

Gets a system-defined color that has an ARGB value of #FFE9967A.

public static Color DarkSalmon { get; }

Property Value

Color

DarkSeaGreen

Gets a system-defined color that has an ARGB value of #FF8FBC8F.

public static Color DarkSeaGreen { get; }

Property Value

Color

DarkSlateBlue

Gets a system-defined color that has an ARGB value of #FF483D8B.

public static Color DarkSlateBlue { get; }

Property Value

Color

DarkSlateGray

Gets a system-defined color that has an ARGB value of #FF2F4F4F.

public static Color DarkSlateGray { get; }

Property Value

Color

DarkTurquoise

Gets a system-defined color that has an ARGB value of #FF00CED1.

public static Color DarkTurquoise { get; }

Property Value

Color

DarkViolet

Gets a system-defined color that has an ARGB value of #FF9400D3.

public static Color DarkViolet { get; }

Property Value

Color

DeepPink

Gets a system-defined color that has an ARGB value of #FFFF1493.

public static Color DeepPink { get; }

Property Value

Color

DeepSkyBlue

Gets a system-defined color that has an ARGB value of #FF00BFFF.

public static Color DeepSkyBlue { get; }

Property Value

Color

DimGray

Gets a system-defined color that has an ARGB value of #FF696969.

public static Color DimGray { get; }

Property Value

Color

DodgerBlue

Gets a system-defined color that has an ARGB value of #FF1E90FF.

public static Color DodgerBlue { get; }

Property Value

Color

Firebrick

Gets a system-defined color that has an ARGB value of #FFB22222.

public static Color Firebrick { get; }

Property Value

Color

FloralWhite

Gets a system-defined color that has an ARGB value of #FFFFFAF0.

public static Color FloralWhite { get; }

Property Value

Color

ForestGreen

Gets a system-defined color that has an ARGB value of #FF228B22.

public static Color ForestGreen { get; }

Property Value

Color

Fuchsia

Gets a system-defined color that has an ARGB value of #FFFF00FF.

public static Color Fuchsia { get; }

Property Value

Color

G

Gets or sets the green value of this Color.

public byte G { readonly get; set; }

Property Value

byte

Gainsboro

Gets a system-defined color that has an ARGB value of #FFDCDCDC.

public static Color Gainsboro { get; }

Property Value

Color

GhostWhite

Gets a system-defined color that has an ARGB value of #FFF8F8FF.

public static Color GhostWhite { get; }

Property Value

Color

Gold

Gets a system-defined color that has an ARGB value of #FFFFD700.

public static Color Gold { get; }

Property Value

Color

Goldenrod

Gets a system-defined color that has an ARGB value of #FFDAA520.

public static Color Goldenrod { get; }

Property Value

Color

Gray

Gets a system-defined color that has an ARGB value of #FF808080.

public static Color Gray { get; }

Property Value

Color

Green

Gets a system-defined color that has an ARGB value of #FF008000.

public static Color Green { get; }

Property Value

Color

GreenYellow

Gets a system-defined color that has an ARGB value of #FFADFF2F.

public static Color GreenYellow { get; }

Property Value

Color

Honeydew

Gets a system-defined color that has an ARGB value of #FFF0FFF0.

public static Color Honeydew { get; }

Property Value

Color

HotPink

Gets a system-defined color that has an ARGB value of #FFFF69B4.

public static Color HotPink { get; }

Property Value

Color

IndianRed

Gets a system-defined color that has an ARGB value of #FFCD5C5C.

public static Color IndianRed { get; }

Property Value

Color

Indigo

Gets a system-defined color that has an ARGB value of #FF4B0082.

public static Color Indigo { get; }

Property Value

Color

Ivory

Gets a system-defined color that has an ARGB value of #FFFFFFF0.

public static Color Ivory { get; }

Property Value

Color

Khaki

Gets a system-defined color that has an ARGB value of #FFF0E68C.

public static Color Khaki { get; }

Property Value

Color

Lavender

Gets a system-defined color that has an ARGB value of #FFE6E6FA.

public static Color Lavender { get; }

Property Value

Color

LavenderBlush

Gets a system-defined color that has an ARGB value of #FFFFF0F5.

public static Color LavenderBlush { get; }

Property Value

Color

LawnGreen

Gets a system-defined color that has an ARGB value of #FF7CFC00.

public static Color LawnGreen { get; }

Property Value

Color

LemonChiffon

Gets a system-defined color that has an ARGB value of #FFFFFACD.

public static Color LemonChiffon { get; }

Property Value

Color

LightBlue

Gets a system-defined color that has an ARGB value of #FFADD8E6.

public static Color LightBlue { get; }

Property Value

Color

LightCoral

Gets a system-defined color that has an ARGB value of #FFF08080.

public static Color LightCoral { get; }

Property Value

Color

LightCyan

Gets a system-defined color that has an ARGB value of #FFE0FFFF.

public static Color LightCyan { get; }

Property Value

Color

LightGoldenrodYellow

Gets a system-defined color that has an ARGB value of #FFFAFAD2.

public static Color LightGoldenrodYellow { get; }

Property Value

Color

LightGray

Gets a system-defined color that has an ARGB value of #FFD3D3D3.

public static Color LightGray { get; }

Property Value

Color

LightGreen

Gets a system-defined color that has an ARGB value of #FF90EE90.

public static Color LightGreen { get; }

Property Value

Color

LightPink

Gets a system-defined color that has an ARGB value of #FFFFB6C1.

public static Color LightPink { get; }

Property Value

Color

LightSalmon

Gets a system-defined color that has an ARGB value of #FFFFA07A.

public static Color LightSalmon { get; }

Property Value

Color

LightSeaGreen

Gets a system-defined color that has an ARGB value of #FF20B2AA.

public static Color LightSeaGreen { get; }

Property Value

Color

LightSkyBlue

Gets a system-defined color that has an ARGB value of #FF87CEFA.

public static Color LightSkyBlue { get; }

Property Value

Color

LightSlateGray

Gets a system-defined color that has an ARGB value of #FF778899.

public static Color LightSlateGray { get; }

Property Value

Color

LightSteelBlue

Gets a system-defined color that has an ARGB value of #FFB0C4DE.

public static Color LightSteelBlue { get; }

Property Value

Color

LightYellow

Gets a system-defined color that has an ARGB value of #FFFFFFE0.

public static Color LightYellow { get; }

Property Value

Color

Lime

Gets a system-defined color that has an ARGB value of #FF00FF00.

public static Color Lime { get; }

Property Value

Color

LimeGreen

Gets a system-defined color that has an ARGB value of #FF32CD32.

public static Color LimeGreen { get; }

Property Value

Color

Linen

Gets a system-defined color that has an ARGB value of #FFFAF0E6.

public static Color Linen { get; }

Property Value

Color

Magenta

Gets a system-defined color that has an ARGB value of #FFFF00FF.

public static Color Magenta { get; }

Property Value

Color

Maroon

Gets a system-defined color that has an ARGB value of #FF800000.

public static Color Maroon { get; }

Property Value

Color

MediumAquamarine

Gets a system-defined color that has an ARGB value of #FF66CDAA.

public static Color MediumAquamarine { get; }

Property Value

Color

MediumBlue

Gets a system-defined color that has an ARGB value of #FF0000CD.

public static Color MediumBlue { get; }

Property Value

Color

MediumOrchid

Gets a system-defined color that has an ARGB value of #FFBA55D3.

public static Color MediumOrchid { get; }

Property Value

Color

MediumPurple

Gets a system-defined color that has an ARGB value of #FF9370DB.

public static Color MediumPurple { get; }

Property Value

Color

MediumSeaGreen

Gets a system-defined color that has an ARGB value of #FF3CB371.

public static Color MediumSeaGreen { get; }

Property Value

Color

MediumSlateBlue

Gets a system-defined color that has an ARGB value of #FF7B68EE.

public static Color MediumSlateBlue { get; }

Property Value

Color

MediumSpringGreen

Gets a system-defined color that has an ARGB value of #FF00FA9A.

public static Color MediumSpringGreen { get; }

Property Value

Color

MediumTurquoise

Gets a system-defined color that has an ARGB value of #FF48D1CC.

public static Color MediumTurquoise { get; }

Property Value

Color

MediumVioletRed

Gets a system-defined color that has an ARGB value of #FFC71585.

public static Color MediumVioletRed { get; }

Property Value

Color

MidnightBlue

Gets a system-defined color that has an ARGB value of #FF191970.

public static Color MidnightBlue { get; }

Property Value

Color

MintCream

Gets a system-defined color that has an ARGB value of #FFF5FFFA.

public static Color MintCream { get; }

Property Value

Color

MistyRose

Gets a system-defined color that has an ARGB value of #FFFFE4E1.

public static Color MistyRose { get; }

Property Value

Color

Moccasin

Gets a system-defined color that has an ARGB value of #FFFFE4B5.

public static Color Moccasin { get; }

Property Value

Color

NavajoWhite

Gets a system-defined color that has an ARGB value of #FFFFDEAD.

public static Color NavajoWhite { get; }

Property Value

Color

Navy

Gets a system-defined color that has an ARGB value of #FF000080.

public static Color Navy { get; }

Property Value

Color

OldLace

Gets a system-defined color that has an ARGB value of #FFFDF5E6.

public static Color OldLace { get; }

Property Value

Color

Olive

Gets a system-defined color that has an ARGB value of #FF808000.

public static Color Olive { get; }

Property Value

Color

OliveDrab

Gets a system-defined color that has an ARGB value of #FF6B8E23.

public static Color OliveDrab { get; }

Property Value

Color

Orange

Gets a system-defined color that has an ARGB value of #FFFFA500.

public static Color Orange { get; }

Property Value

Color

OrangeRed

Gets a system-defined color that has an ARGB value of #FFFF4500.

public static Color OrangeRed { get; }

Property Value

Color

Orchid

Gets a system-defined color that has an ARGB value of #FFDA70D6.

public static Color Orchid { get; }

Property Value

Color

PaleGoldenrod

Gets a system-defined color that has an ARGB value of #FFEEE8AA.

public static Color PaleGoldenrod { get; }

Property Value

Color

PaleGreen

Gets a system-defined color that has an ARGB value of #FF98FB98.

public static Color PaleGreen { get; }

Property Value

Color

PaleTurquoise

Gets a system-defined color that has an ARGB value of #FFAFEEEE.

public static Color PaleTurquoise { get; }

Property Value

Color

PaleVioletRed

Gets a system-defined color that has an ARGB value of #FFDB7093.

public static Color PaleVioletRed { get; }

Property Value

Color

PapayaWhip

Gets a system-defined color that has an ARGB value of #FFFFEFD5.

public static Color PapayaWhip { get; }

Property Value

Color

PeachPuff

Gets a system-defined color that has an ARGB value of #FFFFDAB9.

public static Color PeachPuff { get; }

Property Value

Color

Peru

Gets a system-defined color that has an ARGB value of #FFCD853F.

public static Color Peru { get; }

Property Value

Color

Pink

Gets a system-defined color that has an ARGB value of #FFFFC0CB.

public static Color Pink { get; }

Property Value

Color

Plum

Gets a system-defined color that has an ARGB value of #FFDDA0DD.

public static Color Plum { get; }

Property Value

Color

PowderBlue

Gets a system-defined color that has an ARGB value of #FFB0E0E6.

public static Color PowderBlue { get; }

Property Value

Color

Purple

Gets a system-defined color that has an ARGB value of #FF800080.

public static Color Purple { get; }

Property Value

Color

R

Gets or sets the red value of this Color.

public byte R { readonly get; set; }

Property Value

byte

Red

Gets a system-defined color that has an ARGB value of #FFFF0000.

public static Color Red { get; }

Property Value

Color

RosyBrown

Gets a system-defined color that has an ARGB value of #FFBC8F8F.

public static Color RosyBrown { get; }

Property Value

Color

RoyalBlue

Gets a system-defined color that has an ARGB value of #FF4169E1.

public static Color RoyalBlue { get; }

Property Value

Color

SaddleBrown

Gets a system-defined color that has an ARGB value of #FF8B4513.

public static Color SaddleBrown { get; }

Property Value

Color

Salmon

Gets a system-defined color that has an ARGB value of #FFFA8072.

public static Color Salmon { get; }

Property Value

Color

SandyBrown

Gets a system-defined color that has an ARGB value of #FFF4A460.

public static Color SandyBrown { get; }

Property Value

Color

SeaGreen

Gets a system-defined color that has an ARGB value of #FF2E8B57.

public static Color SeaGreen { get; }

Property Value

Color

SeaShell

Gets a system-defined color that has an ARGB value of #FFFFF5EE.

public static Color SeaShell { get; }

Property Value

Color

Sienna

Gets a system-defined color that has an ARGB value of #FFA0522D.

public static Color Sienna { get; }

Property Value

Color

Silver

Gets a system-defined color that has an ARGB value of #FFC0C0C0.

public static Color Silver { get; }

Property Value

Color

SkyBlue

Gets a system-defined color that has an ARGB value of #FF87CEEB.

public static Color SkyBlue { get; }

Property Value

Color

SlateBlue

Gets a system-defined color that has an ARGB value of #FF6A5ACD.

public static Color SlateBlue { get; }

Property Value

Color

SlateGray

Gets a system-defined color that has an ARGB value of #FF708090.

public static Color SlateGray { get; }

Property Value

Color

Snow

Gets a system-defined color that has an ARGB value of #FFFFFAFA.

public static Color Snow { get; }

Property Value

Color

SpringGreen

Gets a system-defined color that has an ARGB value of #FF00FF7F.

public static Color SpringGreen { get; }

Property Value

Color

SteelBlue

Gets a system-defined color that has an ARGB value of #FF4682B4.

public static Color SteelBlue { get; }

Property Value

Color

Tan

Gets a system-defined color that has an ARGB value of #FFD2B48C.

public static Color Tan { get; }

Property Value

Color

Teal

Gets a system-defined color that has an ARGB value of #FF008080.

public static Color Teal { get; }

Property Value

Color

Thistle

Gets a system-defined color that has an ARGB value of #FFD8BFD8.

public static Color Thistle { get; }

Property Value

Color

Tomato

Gets a system-defined color that has an ARGB value of #FFFF6347.

public static Color Tomato { get; }

Property Value

Color

Transparent

Gets a system-defined color.

public static Color Transparent { get; }

Property Value

Color

Turquoise

Gets a system-defined color that has an ARGB value of #FF40E0D0.

public static Color Turquoise { get; }

Property Value

Color

Violet

Gets a system-defined color that has an ARGB value of #FFEE82EE.

public static Color Violet { get; }

Property Value

Color

Wheat

Gets a system-defined color that has an ARGB value of #FFF5DEB3.

public static Color Wheat { get; }

Property Value

Color

White

Gets a system-defined color that has an ARGB value of #FFFFFFFF.

public static Color White { get; }

Property Value

Color

WhiteSmoke

Gets a system-defined color that has an ARGB value of #FFF5F5F5.

public static Color WhiteSmoke { get; }

Property Value

Color

Yellow

Gets a system-defined color that has an ARGB value of #FFFFFF00.

public static Color Yellow { get; }

Property Value

Color

YellowGreen

Gets a system-defined color that has an ARGB value of #FF9ACD32.

public static Color YellowGreen { get; }

Property Value

Color

Methods

AddGammaCorrection()

Returns this color with sRGB gamma correction added to it.

public Color AddGammaCorrection()

Returns

Color

The gamma corrected version of this color.

Darken(float, bool)

Returns this color darkened specified amount.

public Color Darken(float amount, bool blendAlpha = false)

Parameters

amount float

The amount.

blendAlpha bool

Whether it also blends alpha.

Returns

Color

The darkened color.

Equals(Color)

Indicates whether this instance and a specified object are equal.

public bool Equals(Color other)

Parameters

other Color

Another object to compare to.

Returns

bool

true if other and this instance represent the same value, false otherwise.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

Another object to compare to.

Returns

bool

true if obj and this instance are the same type and represent the same value, false otherwise.

FromInteger(int, ColorFormat)

Returns an Color representation of the specified integer.

public static Color FromInteger(int color, ColorFormat colorFormat)

Parameters

color int

The color to convert.

colorFormat ColorFormat

The ColorFormat to use in the conversion.

Returns

Color

A Color representation of the input.

FromInteger(uint, ColorFormat)

Returns an Color representation of this Integer.

public static Color FromInteger(uint color, ColorFormat colorFormat)

Parameters

color uint

The color to convert.

colorFormat ColorFormat

The ColorFormat to use in the conversion.

Returns

Color

An Color representation of this Integer.

FromString(string, ColorFormat)

Returns an Color representation of the specified string.

public static Color FromString(string input, ColorFormat colorFormat)

Parameters

input string

The color to convert.

colorFormat ColorFormat

The ColorFormat to use in the conversion.

Returns

Color

A Color representation of the input.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Grayscale()

Returns the grayscaled version of this color.

public Color Grayscale()

Returns

Color

The grayscaled version of this color.

Lerp(Color, Color, float, bool)

Performs linear interpolation of Color.

public static Color Lerp(Color value1, Color value2, float amount, bool blendAlpha = false)

Parameters

value1 Color

Source Color.

value2 Color

Destination Color.

amount float

Interpolation factor.

blendAlpha bool

Whether it also blends alpha.

Returns

Color

Interpolated Color.

Lighten(float, bool)

Returns this color lightened specified amount.

public Color Lighten(float amount, bool blendAlpha = false)

Parameters

amount float

The amount.

blendAlpha bool

Whether it also blends alpha.

Returns

Color

The lightened color.

RemoveGammaCorrection()

Returns this color with sRGB gamma correction removed from it.

public Color RemoveGammaCorrection()

Returns

Color

The non-gamma corrected version of this color.

ToInteger(ColorFormat)

Returns an Integer representation of this Color.

public int ToInteger(ColorFormat colorFormat)

Parameters

colorFormat ColorFormat

The ColorFormat to use in the conversion.

Returns

int

An Integer representation of this Color.

ToString()

Returns a string representation of this Color.

public override string ToString()

Returns

string

A string representation of this Color.

ToString(ColorFormat)

Returns a string representation of this Color.

public string ToString(ColorFormat colorFormat)

Parameters

colorFormat ColorFormat

The format to use to convert the color to a string.

Returns

string

A string representation of this Color.

Operators

operator ==(Color, Color)

Implements the operator ==.

public static bool operator ==(Color a, Color b)

Parameters

a Color

The left color.

b Color

The right color.

Returns

bool

The result of the operator.

explicit operator Vector3(Color)

Performs an explicit conversion from Color to Vector3.

public static explicit operator Vector3(Color value)

Parameters

value Color

The value.

Returns

Vector3

The result of the conversion.

implicit operator Colour(Color)

Casts a Colour to a Color.

public static implicit operator Colour(Color value)

Parameters

value Color

The color to cast.

Returns

Colour

implicit operator int(Color)

Cast a Color to an integer.

public static implicit operator int(Color value)

Parameters

value Color

The Color to cast to an integer.

Returns

int

The resulting integer.

implicit operator Color(Colour)

Casts a Color to a Colour.

public static implicit operator Color(Colour value)

Parameters

value Colour

The color to cast.

Returns

Color

implicit operator Color(int)

Cast an integer to a Color.

public static implicit operator Color(int value)

Parameters

value int

The integer to cast to a Color.

Returns

Color

The resulting Color.

implicit operator Color(uint)

Cast an unsigned integer to a Color.

public static implicit operator Color(uint value)

Parameters

value uint

The unsigned integer to cast to a Color.

Returns

Color

The resulting Color.

operator !=(Color, Color)

Implements the operator !=.

public static bool operator !=(Color a, Color b)

Parameters

a Color

The left color.

b Color

The right color.

Returns

bool

The result of the operator.

operator *(Color, float)

Implements the operator *.

public static Color operator *(Color value, float scale)

Parameters

value Color

The value.

scale float

The scale.

Returns

Color

The result of the operator.