Struct SplatColor
- Namespace
- Splat
- Assembly
- Splat.Drawing.dll
A platform independent color structure.
[DataContract]
public struct SplatColor : IEquatable<SplatColor>
- Implements
- Extension Methods
Properties
A
Gets the alpha component of the color.
public byte A { get; }
Property Value
AliceBlue
Gets a color which is alice blue.
public static SplatColor AliceBlue { get; }
Property Value
AntiqueWhite
Gets a color which is antique white.
public static SplatColor AntiqueWhite { get; }
Property Value
Aqua
Gets a color which is aqua.
public static SplatColor Aqua { get; }
Property Value
Aquamarine
Gets a color which is aquamarine.
public static SplatColor Aquamarine { get; }
Property Value
Azure
Gets a color which is azure.
public static SplatColor Azure { get; }
Property Value
B
Gets the blue component of the color.
public byte B { get; }
Property Value
Beige
Gets a color which is beige.
public static SplatColor Beige { get; }
Property Value
Bisque
Gets a color which is bisque.
public static SplatColor Bisque { get; }
Property Value
Black
Gets a color which is black.
public static SplatColor Black { get; }
Property Value
BlanchedAlmond
Gets a color which is blanched almond.
public static SplatColor BlanchedAlmond { get; }
Property Value
Blue
Gets a color which is blue.
public static SplatColor Blue { get; }
Property Value
BlueViolet
Gets a color which is blue violet.
public static SplatColor BlueViolet { get; }
Property Value
Brown
Gets a color which is brown.
public static SplatColor Brown { get; }
Property Value
BurlyWood
Gets a color which is burly wood.
public static SplatColor BurlyWood { get; }
Property Value
CadetBlue
Gets a color which is cadet blue.
public static SplatColor CadetBlue { get; }
Property Value
Chartreuse
Gets a color which is churtreuse.
public static SplatColor Chartreuse { get; }
Property Value
Chocolate
Gets a color which is chocolate.
public static SplatColor Chocolate { get; }
Property Value
Coral
Gets a color which is coral.
public static SplatColor Coral { get; }
Property Value
CornflowerBlue
Gets a color which is cornflower blue.
public static SplatColor CornflowerBlue { get; }
Property Value
Cornsilk
Gets a color which is cornsilk.
public static SplatColor Cornsilk { get; }
Property Value
Crimson
Gets a color which is crimson.
public static SplatColor Crimson { get; }
Property Value
Cyan
Gets a color which is cyan.
public static SplatColor Cyan { get; }
Property Value
DarkBlue
Gets a color which is dark blue.
public static SplatColor DarkBlue { get; }
Property Value
DarkCyan
Gets a color which is dark cyan.
public static SplatColor DarkCyan { get; }
Property Value
DarkGoldenrod
Gets a color which is dark goldenrod.
public static SplatColor DarkGoldenrod { get; }
Property Value
DarkGray
Gets a color which is dark gray.
public static SplatColor DarkGray { get; }
Property Value
DarkGreen
Gets a color which is dark green.
public static SplatColor DarkGreen { get; }
Property Value
DarkKhaki
Gets a color which is dark khaki.
public static SplatColor DarkKhaki { get; }
Property Value
DarkMagenta
Gets a color which is dark magenta.
public static SplatColor DarkMagenta { get; }
Property Value
DarkOliveGreen
Gets a color which is dark olive green.
public static SplatColor DarkOliveGreen { get; }
Property Value
DarkOrange
Gets a color which is dark orange.
public static SplatColor DarkOrange { get; }
Property Value
DarkOrchid
Gets a color which is dark orchid.
public static SplatColor DarkOrchid { get; }
Property Value
DarkRed
Gets a color which is dark red.
public static SplatColor DarkRed { get; }
Property Value
DarkSalmon
Gets a color which is dark salmon.
public static SplatColor DarkSalmon { get; }
Property Value
DarkSeaGreen
Gets a color which is dark sea green.
public static SplatColor DarkSeaGreen { get; }
Property Value
DarkSlateBlue
Gets a color which is dark slate blue.
public static SplatColor DarkSlateBlue { get; }
Property Value
DarkSlateGray
Gets a color which is dark slate gray.
public static SplatColor DarkSlateGray { get; }
Property Value
DarkTurquoise
Gets a color which is dark torquoise.
public static SplatColor DarkTurquoise { get; }
Property Value
DarkViolet
Gets a color which is dark violet.
public static SplatColor DarkViolet { get; }
Property Value
DeepPink
Gets a color which is deep pink.
public static SplatColor DeepPink { get; }
Property Value
DeepSkyBlue
Gets a color which is deep sky blue.
public static SplatColor DeepSkyBlue { get; }
Property Value
DimGray
Gets a color which is dim gray.
public static SplatColor DimGray { get; }
Property Value
DodgerBlue
Gets a color which is dodger blue.
public static SplatColor DodgerBlue { get; }
Property Value
Empty
Gets a full empty which is fully transparent.
public static SplatColor Empty { get; }
Property Value
Firebrick
Gets a color which is fire brick.
public static SplatColor Firebrick { get; }
Property Value
FloralWhite
Gets a color which is floral white.
public static SplatColor FloralWhite { get; }
Property Value
ForestGreen
Gets a color which is forest green.
public static SplatColor ForestGreen { get; }
Property Value
Fuchsia
Gets a color which is fuchsia.
public static SplatColor Fuchsia { get; }
Property Value
G
Gets the green component of the color.
public byte G { get; }
Property Value
Gainsboro
Gets a color which is gainsboro.
public static SplatColor Gainsboro { get; }
Property Value
GhostWhite
Gets a color which is ghost white.
public static SplatColor GhostWhite { get; }
Property Value
Gold
Gets a color which is gold.
public static SplatColor Gold { get; }
Property Value
Goldenrod
Gets a color which is golden rod.
public static SplatColor Goldenrod { get; }
Property Value
Gray
Gets a color which is gray.
public static SplatColor Gray { get; }
Property Value
Green
Gets a color which is green.
public static SplatColor Green { get; }
Property Value
GreenYellow
Gets a color which is green yellow.
public static SplatColor GreenYellow { get; }
Property Value
Honeydew
Gets a color which is honeydew.
public static SplatColor Honeydew { get; }
Property Value
HotPink
Gets a color which is hot pink.
public static SplatColor HotPink { get; }
Property Value
IndianRed
Gets a color which is indian red.
public static SplatColor IndianRed { get; }
Property Value
Indigo
Gets a color which is indigo.
public static SplatColor Indigo { get; }
Property Value
IsEmpty
Gets a value indicating whether the current color is transparent black. Eg where R,G,B,A == 0.
public readonly bool IsEmpty { get; }
Property Value
IsKnownColor
Gets a value indicating whether the color is part of the Splat.SplatColor.ColorType.Known group.
public readonly bool IsKnownColor { get; }
Property Value
IsNamedColor
Gets a value indicating whether the color is par tof the Splat.SplatColor.ColorType.Known or Splat.SplatColor.ColorType.Named groups.
public readonly bool IsNamedColor { get; }
Property Value
IsSystemColor
Gets a value indicating whether the color is part of the Splat.SplatColor.ColorType.System group.
public readonly bool IsSystemColor { get; }
Property Value
Ivory
Gets a color which is ivory.
public static SplatColor Ivory { get; }
Property Value
Khaki
Gets a color which is khaki.
public static SplatColor Khaki { get; }
Property Value
Lavender
Gets a color which is lavender.
public static SplatColor Lavender { get; }
Property Value
LavenderBlush
Gets a color which is lavender blush.
public static SplatColor LavenderBlush { get; }
Property Value
LawnGreen
Gets a color which is lawn green.
public static SplatColor LawnGreen { get; }
Property Value
LemonChiffon
Gets a color which is lemon chiffon.
public static SplatColor LemonChiffon { get; }
Property Value
LightBlue
Gets a color which is light blue.
public static SplatColor LightBlue { get; }
Property Value
LightCoral
Gets a color which is light coral.
public static SplatColor LightCoral { get; }
Property Value
LightCyan
Gets a color which is light cyan.
public static SplatColor LightCyan { get; }
Property Value
LightGoldenrodYellow
Gets a color which is light golden rod yellow.
public static SplatColor LightGoldenrodYellow { get; }
Property Value
LightGray
Gets a color which is light gray.
public static SplatColor LightGray { get; }
Property Value
LightGreen
Gets a value which is light green.
public static SplatColor LightGreen { get; }
Property Value
LightPink
Gets a color which is light pink.
public static SplatColor LightPink { get; }
Property Value
LightSalmon
Gets a color which is light salmon.
public static SplatColor LightSalmon { get; }
Property Value
LightSeaGreen
Gets a color which is light sea green.
public static SplatColor LightSeaGreen { get; }
Property Value
LightSkyBlue
Gets a color which is light sky blue.
public static SplatColor LightSkyBlue { get; }
Property Value
LightSlateGray
Gets a color which is light slate gray.
public static SplatColor LightSlateGray { get; }
Property Value
LightSteelBlue
Gets a color which is light steel blue.
public static SplatColor LightSteelBlue { get; }
Property Value
LightYellow
Gets a color which is light yellow.
public static SplatColor LightYellow { get; }
Property Value
Lime
Gets a color which is lime.
public static SplatColor Lime { get; }
Property Value
LimeGreen
Gets a color which is lime green.
public static SplatColor LimeGreen { get; }
Property Value
Linen
Gets a color which is linen.
public static SplatColor Linen { get; }
Property Value
Magenta
Gets a color which is magenta.
public static SplatColor Magenta { get; }
Property Value
Maroon
Gets a color which is maroon.
public static SplatColor Maroon { get; }
Property Value
MediumAquamarine
Gets a color which is medium aquamarine.
public static SplatColor MediumAquamarine { get; }
Property Value
MediumBlue
Gets a color which is medium blue.
public static SplatColor MediumBlue { get; }
Property Value
MediumOrchid
Gets a color which is medium orchid.
public static SplatColor MediumOrchid { get; }
Property Value
MediumPurple
Gets a color which is medium purple.
public static SplatColor MediumPurple { get; }
Property Value
MediumSeaGreen
Gets a color which is medium sea green.
public static SplatColor MediumSeaGreen { get; }
Property Value
MediumSlateBlue
Gets a color which is medium slate blue.
public static SplatColor MediumSlateBlue { get; }
Property Value
MediumSpringGreen
Gets a color which is medium spring green.
public static SplatColor MediumSpringGreen { get; }
Property Value
MediumTurquoise
Gets a color which is medium turquoise.
public static SplatColor MediumTurquoise { get; }
Property Value
MediumVioletRed
Gets a color which is medium violet red.
public static SplatColor MediumVioletRed { get; }
Property Value
MidnightBlue
Gets a color which is midnight blue.
public static SplatColor MidnightBlue { get; }
Property Value
MintCream
Gets a color which is mint cream.
public static SplatColor MintCream { get; }
Property Value
MistyRose
Gets a color which is misty rose.
public static SplatColor MistyRose { get; }
Property Value
Moccasin
Gets a color which is moccasin.
public static SplatColor Moccasin { get; }
Property Value
Name
Gets the name of the color if one is known. Otherwise will be the hex value.
public string Name { get; }
Property Value
NavajoWhite
Gets a color which is navajo white.
public static SplatColor NavajoWhite { get; }
Property Value
Navy
Gets a color which is navy.
public static SplatColor Navy { get; }
Property Value
OldLace
Gets a color hwich is old lace.
public static SplatColor OldLace { get; }
Property Value
Olive
Gets a color which is olive.
public static SplatColor Olive { get; }
Property Value
OliveDrab
Gets a color which is olive drab.
public static SplatColor OliveDrab { get; }
Property Value
Orange
Gets a color which is orange.
public static SplatColor Orange { get; }
Property Value
OrangeRed
Gets a color which is orange red.
public static SplatColor OrangeRed { get; }
Property Value
Orchid
Gets a color which is orchid.
public static SplatColor Orchid { get; }
Property Value
PaleGoldenrod
Gets a color which is pale golden rod.
public static SplatColor PaleGoldenrod { get; }
Property Value
PaleGreen
Gets a color which is pale green.
public static SplatColor PaleGreen { get; }
Property Value
PaleTurquoise
Gets a color which is pale turquoise.
public static SplatColor PaleTurquoise { get; }
Property Value
PaleVioletRed
Gets a color which is pale violet red.
public static SplatColor PaleVioletRed { get; }
Property Value
PapayaWhip
Gets a color which is papaya whip.
public static SplatColor PapayaWhip { get; }
Property Value
PeachPuff
Gets a color which is peach puff.
public static SplatColor PeachPuff { get; }
Property Value
Peru
Gets a color which is peru.
public static SplatColor Peru { get; }
Property Value
Pink
Gets a color which is pink.
public static SplatColor Pink { get; }
Property Value
Plum
Gets a color which is plum.
public static SplatColor Plum { get; }
Property Value
PowderBlue
Gets a color which is powder blue.
public static SplatColor PowderBlue { get; }
Property Value
Purple
Gets a color which is purple.
public static SplatColor Purple { get; }
Property Value
R
Gets the red component of the color.
public byte R { get; }
Property Value
Red
Gets a color which is red.
public static SplatColor Red { get; }
Property Value
RosyBrown
Gets a color which is rosy brown.
public static SplatColor RosyBrown { get; }
Property Value
RoyalBlue
Gets a color which is royal blue.
public static SplatColor RoyalBlue { get; }
Property Value
SaddleBrown
Gets a color which is saddle brown.
public static SplatColor SaddleBrown { get; }
Property Value
Salmon
Gets a color which is salmon.
public static SplatColor Salmon { get; }
Property Value
SandyBrown
Gets a color which is sandy brown.
public static SplatColor SandyBrown { get; }
Property Value
SeaGreen
Gets a color which is sea green.
public static SplatColor SeaGreen { get; }
Property Value
SeaShell
Gets a color which is sea shell.
public static SplatColor SeaShell { get; }
Property Value
Sienna
Gets a color which is sienna.
public static SplatColor Sienna { get; }
Property Value
Silver
Gets a color which is silver.
public static SplatColor Silver { get; }
Property Value
SkyBlue
Gets a color which is sky blue.
public static SplatColor SkyBlue { get; }
Property Value
SlateBlue
Gets a color which is slate blue.
public static SplatColor SlateBlue { get; }
Property Value
SlateGray
Gets a color which is slate gray.
public static SplatColor SlateGray { get; }
Property Value
Snow
Gets a color which is snow.
public static SplatColor Snow { get; }
Property Value
SpringGreen
Gets a color which is spring green.
public static SplatColor SpringGreen { get; }
Property Value
SteelBlue
Gets a color which is steel blue.
public static SplatColor SteelBlue { get; }
Property Value
Tan
Gets a color which is tan.
public static SplatColor Tan { get; }
Property Value
Teal
Gets a color which is teal.
public static SplatColor Teal { get; }
Property Value
Thistle
Gets a color which is thistle.
public static SplatColor Thistle { get; }
Property Value
Tomato
Gets a color which is tomato.
public static SplatColor Tomato { get; }
Property Value
Transparent
Gets a color which is fully transparent.
public static SplatColor Transparent { get; }
Property Value
Turquoise
Gets a color which is turquoise.
public static SplatColor Turquoise { get; }
Property Value
Violet
Gets a color which is violet.
public static SplatColor Violet { get; }
Property Value
Wheat
Gets a color which is wheat.
public static SplatColor Wheat { get; }
Property Value
White
Gets a color which is white.
public static SplatColor White { get; }
Property Value
WhiteSmoke
Gets a color which is white smoke.
public static SplatColor WhiteSmoke { get; }
Property Value
Yellow
Gets a color which is yellow.
public static SplatColor Yellow { get; }
Property Value
YellowGreen
Gets a color which is yellow green.
public static SplatColor YellowGreen { get; }
Property Value
Methods
Equals(SplatColor)
public bool Equals(SplatColor other)
Parameters
other
SplatColor
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
FromArgb(int, SplatColor)
Creates a new SplatColor from another SplatColor, replacing its alpha with one specified.
public static SplatColor FromArgb(int alpha, SplatColor baseColor)
Parameters
alpha
intThe new alpha component to set for the new SplatColor.
baseColor
SplatColorThe base color to use for the RGB values.
Returns
- SplatColor
The new SplatColor.
FromArgb(int, int, int)
Creates a SplatColor from the RGB values. The alpha will be set to 255 for full alpha.
public static SplatColor FromArgb(int red, int green, int blue)
Parameters
red
intThe red channel of the color.
green
intThe green channel of the color.
blue
intThe blue channel of the color.
Returns
- SplatColor
A splat color from the specified channels.
FromArgb(int, int, int, int)
Creates a SplatColor from the RGB values.
public static SplatColor FromArgb(int alpha, int red, int green, int blue)
Parameters
alpha
intThe alpha channel of the color.
red
intThe red channel of the color.
green
intThe green channel of the color.
blue
intThe blue channel of the color.
Returns
- SplatColor
A splat color from the specified channels.
FromArgb(uint)
Creates a new SplatColor from the specified int based ARGB value.
public static SplatColor FromArgb(uint argb)
Parameters
argb
uintThe int containing the ARGB values.
Returns
- SplatColor
The new SplatColor.
FromKnownColor(KnownColor)
Gets a SplatColor from a KnownColor value.
public static SplatColor FromKnownColor(KnownColor color)
Parameters
color
KnownColorThe color to generate.
Returns
- SplatColor
The generated SplatValue.
FromName(string)
Gets a SplatColor from a name.
public static SplatColor FromName(string name)
Parameters
name
stringThe name of the color to generate.
Returns
- SplatColor
The generated SplatValue.
GetBrightness()
Gets the brightness of the color.
public float GetBrightness()
Returns
- float
The brightness of the value between 0 and 1.
GetHashCode()
public override int GetHashCode()
Returns
GetHue()
Gets the hue of the color.
public float GetHue()
Returns
- float
The hue component of the color.
GetSaturation()
Gets the saturation of the color.
public float GetSaturation()
Returns
- float
The saturation of the value between 0 and 1.
ToArgb()
Gets the integer value of the color.
public uint ToArgb()
Returns
- uint
The integer value.
ToKnownColor()
Gets the KnownColor of the current value (if one is available).
public readonly KnownColor ToKnownColor()
Returns
- KnownColor
Returns the KnownColor enum value for this color, 0 if is not known.
ToString()
public override string ToString()
Returns
Operators
operator ==(SplatColor, SplatColor)
Compares two SplatColor references and determines if they are equivalent based on their A,R,G,B values.
public static bool operator ==(SplatColor left, SplatColor right)
Parameters
left
SplatColorThe first SplatColor to compare.
right
SplatColorThe second SplatColor to compare.
Returns
- bool
If they are equivalent to each other.
operator !=(SplatColor, SplatColor)
Compares two SplatColor references and determines if they are not equivalent based on their A,R,G,B values.
public static bool operator !=(SplatColor left, SplatColor right)
Parameters
left
SplatColorThe first SplatColor to compare.
right
SplatColorThe second SplatColor to compare.
Returns
- bool
If they are not equivalent to each other.