Skip to content

SplatColor struct

Attributes: [DataContract]

Defined in

Namespace: Splat Assembly: Splat.Drawing.dll Full name: Splat.SplatColor Modifiers: public sealed

Summary

View source

        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

NameSummary
static EmptyGets an instance of SplatColor that represents an uninitialized or empty color value (transparent).
IsEmptyGets a value indicating whether the current color is transparent black. Eg where R,G,B,A == 0.
AGets the alpha component of the color.
RGets the red component of the color.
GGets the green component of the color.
BGets the blue component of the color.
NameGets the name of the color if one is known. Otherwise will be the hex value.
IsKnownColorGets a value indicating whether the color is part of the Known group.
IsSystemColorGets a value indicating whether the color is part of the System group.
IsNamedColorGets a value indicating whether the color is par tof the Known or Named groups.
static TransparentGets a color which is fully transparent.
static AliceBlueGets a color which is alice blue.
static AntiqueWhiteGets a color which is antique white.
static AquaGets a color which is aqua.
static AquamarineGets a color which is aquamarine.
static AzureGets a color which is azure.
static BeigeGets a color which is beige.
static BisqueGets a color which is bisque.
static BlackGets a color which is black.
static BlanchedAlmondGets a color which is blanched almond.
static BlueGets a color which is blue.
static BlueVioletGets a color which is blue violet.
static BrownGets a color which is brown.
static BurlyWoodGets a color which is burly wood.
static CadetBlueGets a color which is cadet blue.
static ChartreuseGets a color which is churtreuse.
static ChocolateGets a color which is chocolate.
static CoralGets a color which is coral.
static CornflowerBlueGets a color which is cornflower blue.
static CornsilkGets a color which is cornsilk.
static CrimsonGets a color which is crimson.
static CyanGets a color which is cyan.
static DarkBlueGets a color which is dark blue.
static DarkCyanGets a color which is dark cyan.
static DarkGoldenrodGets a color which is dark goldenrod.
static DarkGrayGets a color which is dark gray.
static DarkGreenGets a color which is dark green.
static DarkKhakiGets a color which is dark khaki.
static DarkMagentaGets a color which is dark magenta.
static DarkOliveGreenGets a color which is dark olive green.
static DarkOrangeGets a color which is dark orange.
static DarkOrchidGets a color which is dark orchid.
static DarkRedGets a color which is dark red.
static DarkSalmonGets a color which is dark salmon.
static DarkSeaGreenGets a color which is dark sea green.
static DarkSlateBlueGets a color which is dark slate blue.
static DarkSlateGrayGets a color which is dark slate gray.
static DarkTurquoiseGets a color which is dark torquoise.
static DarkVioletGets a color which is dark violet.
static DeepPinkGets a color which is deep pink.
static DeepSkyBlueGets a color which is deep sky blue.
static DimGrayGets a color which is dim gray.
static DodgerBlueGets a color which is dodger blue.
static FirebrickGets a color which is fire brick.
static FloralWhiteGets a color which is floral white.
static ForestGreenGets a color which is forest green.
static FuchsiaGets a color which is fuchsia.
static GainsboroGets a color which is gainsboro.
static GhostWhiteGets a color which is ghost white.
static GoldGets a color which is gold.
static GoldenrodGets a color which is golden rod.
static GrayGets a color which is gray.
static GreenGets a color which is green.
static GreenYellowGets a color which is green yellow.
static HoneydewGets a color which is honeydew.
static HotPinkGets a color which is hot pink.
static IndianRedGets a color which is indian red.
static IndigoGets a color which is indigo.
static IvoryGets a color which is ivory.
static KhakiGets a color which is khaki.
static LavenderGets a color which is lavender.
static LavenderBlushGets a color which is lavender blush.
static LawnGreenGets a color which is lawn green.
static LemonChiffonGets a color which is lemon chiffon.
static LightBlueGets a color which is light blue.
static LightCoralGets a color which is light coral.
static LightCyanGets a color which is light cyan.
static LightGoldenrodYellowGets a color which is light golden rod yellow.
static LightGreenGets a value which is light green.
static LightGrayGets a color which is light gray.
static LightPinkGets a color which is light pink.
static LightSalmonGets a color which is light salmon.
static LightSeaGreenGets a color which is light sea green.
static LightSkyBlueGets a color which is light sky blue.
static LightSlateGrayGets a color which is light slate gray.
static LightSteelBlueGets a color which is light steel blue.
static LightYellowGets a color which is light yellow.
static LimeGets a color which is lime.
static LimeGreenGets a color which is lime green.
static LinenGets a color which is linen.
static MagentaGets a color which is magenta.
static MaroonGets a color which is maroon.
static MediumAquamarineGets a color which is medium aquamarine.
static MediumBlueGets a color which is medium blue.
static MediumOrchidGets a color which is medium orchid.
static MediumPurpleGets a color which is medium purple.
static MediumSeaGreenGets a color which is medium sea green.
static MediumSlateBlueGets a color which is medium slate blue.
static MediumSpringGreenGets a color which is medium spring green.
static MediumTurquoiseGets a color which is medium turquoise.
static MediumVioletRedGets a color which is medium violet red.
static MidnightBlueGets a color which is midnight blue.
static MintCreamGets a color which is mint cream.
static MistyRoseGets a color which is misty rose.
static MoccasinGets a color which is moccasin.
static NavajoWhiteGets a color which is navajo white.
static NavyGets a color which is navy.
static OldLaceGets a color hwich is old lace.
static OliveGets a color which is olive.
static OliveDrabGets a color which is olive drab.
static OrangeGets a color which is orange.
static OrangeRedGets a color which is orange red.
static OrchidGets a color which is orchid.
static PaleGoldenrodGets a color which is pale golden rod.
static PaleGreenGets a color which is pale green.
static PaleTurquoiseGets a color which is pale turquoise.
static PaleVioletRedGets a color which is pale violet red.
static PapayaWhipGets a color which is papaya whip.
static PeachPuffGets a color which is peach puff.
static PeruGets a color which is peru.
static PinkGets a color which is pink.
static PlumGets a color which is plum.
static PowderBlueGets a color which is powder blue.
static PurpleGets a color which is purple.
static RedGets a color which is red.
static RosyBrownGets a color which is rosy brown.
static RoyalBlueGets a color which is royal blue.
static SaddleBrownGets a color which is saddle brown.
static SalmonGets a color which is salmon.
static SandyBrownGets a color which is sandy brown.
static SeaGreenGets a color which is sea green.
static SeaShellGets a color which is sea shell.
static SiennaGets a color which is sienna.
static SilverGets a color which is silver.
static SkyBlueGets a color which is sky blue.
static SlateBlueGets a color which is slate blue.
static SlateGrayGets a color which is slate gray.
static SnowGets a color which is snow.
static SpringGreenGets a color which is spring green.
static SteelBlueGets a color which is steel blue.
static TanGets a color which is tan.
static TealGets a color which is teal.
static ThistleGets a color which is thistle.
static TomatoGets a color which is tomato.
static TurquoiseGets a color which is turquoise.
static VioletGets a color which is violet.
static WheatGets a color which is wheat.
static WhiteGets a color which is white.
static WhiteSmokeGets a color which is white smoke.
static YellowGets a color which is yellow.
static YellowGreenGets a color which is yellow green.

Methods

NameSummary
static FromArgbCreates a SplatColor from the RGB values. The alpha will be set to 255 for full alpha.
static FromKnownColorGets a SplatColor from a [KnownColor](# value.
static FromNameGets a SplatColor from a name.
GetBrightnessGets the brightness of the color.
GetSaturationGets the saturation of the color.
ToArgbGets the integer value of the color.
GetHueGets the hue of the color.
ToKnownColorGets the [KnownColor](# of the current value (if one is available).
Equals
GetHashCode
ToString

Operators

NameSummary
static op_EqualityCompares two SplatColor references and determines if they are equivalent based on their A,R,G,B values.
static op_InequalityCompares two SplatColor references and determines if they are not equivalent based on their A,R,G,B values.

Extension members