SplatColor struct¶
Attributes: [DataContract]
Defined in
Namespace: Splat
Assembly: Splat.Drawing.dll
Full name: Splat.SplatColor
Modifiers: public sealed
Summary¶
Represents an immutable color value, providing a set of predefined named colors and methods for color manipulation
and comparison.
Applies to
net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-windows10.0.19041, net10.0-desktop1.0, net10.0-ios26.0, net10.0-android36.0, net10.0-windows10.0.17763, net10.0-macos26.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net9.0-windows10.0.17763, net9.0-windows10.0.19041, net8.0, net8.0-macos14.5, net8.0-windows10.0.19041, net8.0-windows10.0.17763, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-tvos17.2, netstandard2.1, net462, net481
Class hierarchy
classDiagram
class SplatColor
class IEquatable~SplatColor~ {
<>
}
IEquatable~SplatColor~ <|.. SplatColor
Implements: IEquatable
Remarks¶
The SplatColor struct offers a comprehensive set of standard named colors, similar to those defined in web and system color specifications. These named colors can be used for consistent color selection in graphics, UI, or drawing operations. SplatColor instances are immutable and can be compared for equality. Additional methods may be available for creating custom colors or converting between color representations, depending on the full API surface.
Properties¶
| Name | Summary |
|---|---|
| static Empty | Gets an instance of SplatColor that represents an uninitialized or empty color value (transparent). |
| IsEmpty | Gets a value indicating whether the current color is transparent black. Eg where R,G,B,A == 0. |
| A | Gets the alpha component of the color. |
| R | Gets the red component of the color. |
| G | Gets the green component of the color. |
| B | Gets the blue component of the color. |
| Name | Gets the name of the color if one is known. Otherwise will be the hex value. |
| IsKnownColor | Gets a value indicating whether the color is part of the Known group. |
| IsSystemColor | Gets a value indicating whether the color is part of the System group. |
| IsNamedColor | Gets a value indicating whether the color is par tof the Known or Named groups. |
| static Transparent | Gets a color which is fully transparent. |
| static AliceBlue | Gets a color which is alice blue. |
| static AntiqueWhite | Gets a color which is antique white. |
| static Aqua | Gets a color which is aqua. |
| static Aquamarine | Gets a color which is aquamarine. |
| static Azure | Gets a color which is azure. |
| static Beige | Gets a color which is beige. |
| static Bisque | Gets a color which is bisque. |
| static Black | Gets a color which is black. |
| static BlanchedAlmond | Gets a color which is blanched almond. |
| static Blue | Gets a color which is blue. |
| static BlueViolet | Gets a color which is blue violet. |
| static Brown | Gets a color which is brown. |
| static BurlyWood | Gets a color which is burly wood. |
| static CadetBlue | Gets a color which is cadet blue. |
| static Chartreuse | Gets a color which is churtreuse. |
| static Chocolate | Gets a color which is chocolate. |
| static Coral | Gets a color which is coral. |
| static CornflowerBlue | Gets a color which is cornflower blue. |
| static Cornsilk | Gets a color which is cornsilk. |
| static Crimson | Gets a color which is crimson. |
| static Cyan | Gets a color which is cyan. |
| static DarkBlue | Gets a color which is dark blue. |
| static DarkCyan | Gets a color which is dark cyan. |
| static DarkGoldenrod | Gets a color which is dark goldenrod. |
| static DarkGray | Gets a color which is dark gray. |
| static DarkGreen | Gets a color which is dark green. |
| static DarkKhaki | Gets a color which is dark khaki. |
| static DarkMagenta | Gets a color which is dark magenta. |
| static DarkOliveGreen | Gets a color which is dark olive green. |
| static DarkOrange | Gets a color which is dark orange. |
| static DarkOrchid | Gets a color which is dark orchid. |
| static DarkRed | Gets a color which is dark red. |
| static DarkSalmon | Gets a color which is dark salmon. |
| static DarkSeaGreen | Gets a color which is dark sea green. |
| static DarkSlateBlue | Gets a color which is dark slate blue. |
| static DarkSlateGray | Gets a color which is dark slate gray. |
| static DarkTurquoise | Gets a color which is dark torquoise. |
| static DarkViolet | Gets a color which is dark violet. |
| static DeepPink | Gets a color which is deep pink. |
| static DeepSkyBlue | Gets a color which is deep sky blue. |
| static DimGray | Gets a color which is dim gray. |
| static DodgerBlue | Gets a color which is dodger blue. |
| static Firebrick | Gets a color which is fire brick. |
| static FloralWhite | Gets a color which is floral white. |
| static ForestGreen | Gets a color which is forest green. |
| static Fuchsia | Gets a color which is fuchsia. |
| static Gainsboro | Gets a color which is gainsboro. |
| static GhostWhite | Gets a color which is ghost white. |
| static Gold | Gets a color which is gold. |
| static Goldenrod | Gets a color which is golden rod. |
| static Gray | Gets a color which is gray. |
| static Green | Gets a color which is green. |
| static GreenYellow | Gets a color which is green yellow. |
| static Honeydew | Gets a color which is honeydew. |
| static HotPink | Gets a color which is hot pink. |
| static IndianRed | Gets a color which is indian red. |
| static Indigo | Gets a color which is indigo. |
| static Ivory | Gets a color which is ivory. |
| static Khaki | Gets a color which is khaki. |
| static Lavender | Gets a color which is lavender. |
| static LavenderBlush | Gets a color which is lavender blush. |
| static LawnGreen | Gets a color which is lawn green. |
| static LemonChiffon | Gets a color which is lemon chiffon. |
| static LightBlue | Gets a color which is light blue. |
| static LightCoral | Gets a color which is light coral. |
| static LightCyan | Gets a color which is light cyan. |
| static LightGoldenrodYellow | Gets a color which is light golden rod yellow. |
| static LightGreen | Gets a value which is light green. |
| static LightGray | Gets a color which is light gray. |
| static LightPink | Gets a color which is light pink. |
| static LightSalmon | Gets a color which is light salmon. |
| static LightSeaGreen | Gets a color which is light sea green. |
| static LightSkyBlue | Gets a color which is light sky blue. |
| static LightSlateGray | Gets a color which is light slate gray. |
| static LightSteelBlue | Gets a color which is light steel blue. |
| static LightYellow | Gets a color which is light yellow. |
| static Lime | Gets a color which is lime. |
| static LimeGreen | Gets a color which is lime green. |
| static Linen | Gets a color which is linen. |
| static Magenta | Gets a color which is magenta. |
| static Maroon | Gets a color which is maroon. |
| static MediumAquamarine | Gets a color which is medium aquamarine. |
| static MediumBlue | Gets a color which is medium blue. |
| static MediumOrchid | Gets a color which is medium orchid. |
| static MediumPurple | Gets a color which is medium purple. |
| static MediumSeaGreen | Gets a color which is medium sea green. |
| static MediumSlateBlue | Gets a color which is medium slate blue. |
| static MediumSpringGreen | Gets a color which is medium spring green. |
| static MediumTurquoise | Gets a color which is medium turquoise. |
| static MediumVioletRed | Gets a color which is medium violet red. |
| static MidnightBlue | Gets a color which is midnight blue. |
| static MintCream | Gets a color which is mint cream. |
| static MistyRose | Gets a color which is misty rose. |
| static Moccasin | Gets a color which is moccasin. |
| static NavajoWhite | Gets a color which is navajo white. |
| static Navy | Gets a color which is navy. |
| static OldLace | Gets a color hwich is old lace. |
| static Olive | Gets a color which is olive. |
| static OliveDrab | Gets a color which is olive drab. |
| static Orange | Gets a color which is orange. |
| static OrangeRed | Gets a color which is orange red. |
| static Orchid | Gets a color which is orchid. |
| static PaleGoldenrod | Gets a color which is pale golden rod. |
| static PaleGreen | Gets a color which is pale green. |
| static PaleTurquoise | Gets a color which is pale turquoise. |
| static PaleVioletRed | Gets a color which is pale violet red. |
| static PapayaWhip | Gets a color which is papaya whip. |
| static PeachPuff | Gets a color which is peach puff. |
| static Peru | Gets a color which is peru. |
| static Pink | Gets a color which is pink. |
| static Plum | Gets a color which is plum. |
| static PowderBlue | Gets a color which is powder blue. |
| static Purple | Gets a color which is purple. |
| static Red | Gets a color which is red. |
| static RosyBrown | Gets a color which is rosy brown. |
| static RoyalBlue | Gets a color which is royal blue. |
| static SaddleBrown | Gets a color which is saddle brown. |
| static Salmon | Gets a color which is salmon. |
| static SandyBrown | Gets a color which is sandy brown. |
| static SeaGreen | Gets a color which is sea green. |
| static SeaShell | Gets a color which is sea shell. |
| static Sienna | Gets a color which is sienna. |
| static Silver | Gets a color which is silver. |
| static SkyBlue | Gets a color which is sky blue. |
| static SlateBlue | Gets a color which is slate blue. |
| static SlateGray | Gets a color which is slate gray. |
| static Snow | Gets a color which is snow. |
| static SpringGreen | Gets a color which is spring green. |
| static SteelBlue | Gets a color which is steel blue. |
| static Tan | Gets a color which is tan. |
| static Teal | Gets a color which is teal. |
| static Thistle | Gets a color which is thistle. |
| static Tomato | Gets a color which is tomato. |
| static Turquoise | Gets a color which is turquoise. |
| static Violet | Gets a color which is violet. |
| static Wheat | Gets a color which is wheat. |
| static White | Gets a color which is white. |
| static WhiteSmoke | Gets a color which is white smoke. |
| static Yellow | Gets a color which is yellow. |
| static YellowGreen | Gets a color which is yellow green. |
Methods¶
| Name | Summary |
|---|---|
| static FromArgb | Creates a SplatColor from the RGB values. The alpha will be set to 255 for full alpha. |
| static FromKnownColor | Gets a SplatColor from a [KnownColor](# value. |
| static FromName | Gets a SplatColor from a name. |
| GetBrightness | Gets the brightness of the color. |
| GetSaturation | Gets the saturation of the color. |
| ToArgb | Gets the integer value of the color. |
| GetHue | Gets the hue of the color. |
| ToKnownColor | Gets the [KnownColor](# of the current value (if one is available). |
| Equals | |
| GetHashCode | |
| ToString |
Operators¶
| Name | Summary |
|---|---|
| static op_Equality | Compares two SplatColor references and determines if they are equivalent based on their A,R,G,B values. |
| static op_Inequality | Compares two SplatColor references and determines if they are not equivalent based on their A,R,G,B values. |