• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp
      • Color
      • ColorMatrix
      • Configuration
      • DenseMatrix<T>
      • GeometryUtilities
      • GraphicOptionsDefaultsExtensions
      • GraphicsOptions
      • IConfigurationModule
      • IDeepCloneable
      • IDeepCloneable<T>
      • IImage
      • IImageInfo
      • Image
      • Image<TPixel>
      • ImageExtensions
      • ImageFormatException
      • ImageFrame
      • ImageFrame<TPixel>
      • ImageFrameCollection
      • ImageFrameCollection<TPixel>
      • ImageInfoExtensions
      • ImageProcessingException
      • IndexedImageFrame<TPixel>
      • InvalidImageContentException
      • Matrix3x2Extensions
      • MetadataExtensions
      • Number
      • Point
      • PointF
      • Rational
      • ReadOrigin
      • Rectangle
      • RectangleF
      • SignedRational
      • Size
      • SizeF
      • UnknownImageFormatException
    • SixLabors.ImageSharp.Advanced
      • AdvancedImageExtensions
      • IImageVisitor
      • IImageVisitorAsync
      • IRowIntervalOperation
      • IRowIntervalOperation<TBuffer>
      • IRowOperation
      • IRowOperation<TBuffer>
      • ParallelExecutionSettings
      • ParallelRowIterator
    • SixLabors.ImageSharp.ColorSpaces
      • CieLab
      • CieLch
      • CieLchuv
      • CieLuv
      • CieXyy
      • CieXyz
      • Cmyk
      • Hsl
      • Hsv
      • HunterLab
      • Illuminants
      • LinearRgb
      • Lms
      • Rgb
      • RgbWorkingSpaces
      • YCbCr
    • SixLabors.ImageSharp.ColorSpaces.Companding
      • GammaCompanding
      • LCompanding
      • Rec2020Companding
      • Rec709Companding
      • SRgbCompanding
    • SixLabors.ImageSharp.ColorSpaces.Conversion
      • CieXyChromaticityCoordinates
      • ColorSpaceConverter
      • ColorSpaceConverterOptions
      • GammaWorkingSpace
      • IChromaticAdaptation
      • LmsAdaptationMatrix
      • LWorkingSpace
      • Rec2020WorkingSpace
      • Rec709WorkingSpace
      • RgbPrimariesChromaticityCoordinates
      • RgbWorkingSpace
      • SRgbWorkingSpace
      • VonKriesChromaticAdaptation
    • SixLabors.ImageSharp.Formats
      • IImageDecoder
      • IImageEncoder
      • IImageFormat
      • IImageFormat<TFormatMetadata, TFormatFrameMetadata>
      • IImageFormat<TFormatMetadata>
      • IImageFormatDetector
      • IImageInfoDetector
      • ImageFormatManager
      • PixelTypeInfo
    • SixLabors.ImageSharp.Formats.Bmp
      • BmpBitsPerPixel
      • BmpConfigurationModule
      • BmpDecoder
      • BmpEncoder
      • BmpFileMarkerType
      • BmpFormat
      • BmpImageFormatDetector
      • BmpInfoHeaderType
      • BmpMetadata
      • RleSkippedPixelHandling
    • SixLabors.ImageSharp.Formats.Gif
      • GifColorTableMode
      • GifConfigurationModule
      • GifDecoder
      • GifDisposalMethod
      • GifEncoder
      • GifFormat
      • GifFrameMetadata
      • GifImageFormatDetector
      • GifMetadata
      • IGifExtension
    • SixLabors.ImageSharp.Formats.Jpeg
      • JpegConfigurationModule
      • JpegDecoder
      • JpegEncoder
      • JpegFormat
      • JpegImageFormatDetector
      • JpegMetadata
      • JpegSubsample
    • SixLabors.ImageSharp.Formats.Png
      • PngBitDepth
      • PngChunkFilter
      • PngColorType
      • PngCompressionLevel
      • PngConfigurationModule
      • PngDecoder
      • PngEncoder
      • PngFilterMethod
      • PngFormat
      • PngImageFormatDetector
      • PngInterlaceMode
      • PngMetadata
      • PngTextData
      • PngTransparentColorMode
    • SixLabors.ImageSharp.Formats.Tga
      • TgaBitsPerPixel
      • TgaCompression
      • TgaConfigurationModule
      • TgaDecoder
      • TgaEncoder
      • TgaFormat
      • TgaImageFormatDetector
      • TgaImageType
      • TgaImageTypeExtensions
      • TgaMetadata
    • SixLabors.ImageSharp.Memory
      • AllocationOptions
      • ArrayPoolMemoryAllocator
      • Buffer2D<T>
      • Buffer2DExtensions
      • Buffer2DRegion<T>
      • IManagedByteBuffer
      • IMemoryGroup<T>
      • InvalidMemoryOperationException
      • MemoryAllocator
      • MemoryAllocatorExtensions
      • RowInterval
      • SimpleGcMemoryAllocator
    • SixLabors.ImageSharp.Metadata
      • FrameDecodingMode
      • ImageFrameMetadata
      • ImageMetadata
      • PixelResolutionUnit
    • SixLabors.ImageSharp.Metadata.Profiles.Exif
      • ExifDataType
      • ExifParts
      • ExifProfile
      • ExifTag
      • ExifTag<TValueType>
      • IExifValue
      • IExifValue<TValueType>
    • SixLabors.ImageSharp.Metadata.Profiles.Icc
      • IccColorSpaceType
      • IccDeviceAttribute
      • IccPrimaryPlatformType
      • IccProfile
      • IccProfileClass
      • IccProfileFlag
      • IccProfileHeader
      • IccProfileId
      • IccProfileTag
      • IccRenderingIntent
      • IccTagDataEntry
      • IccTypeSignature
      • IccVersion
      • InvalidIccProfileException
    • SixLabors.ImageSharp.Metadata.Profiles.Iptc
      • IptcProfile
      • IptcTag
      • IptcTagExtensions
      • IptcValue
    • SixLabors.ImageSharp.PixelFormats
      • A8
      • Argb32
      • Bgr24
      • Bgr565
      • Bgra32
      • Bgra4444
      • Bgra5551
      • Byte4
      • HalfSingle
      • HalfVector2
      • HalfVector4
      • IPackedVector<TPacked>
      • IPixel
      • IPixel<TSelf>
      • L16
      • L8
      • La16
      • La32
      • NormalizedByte2
      • NormalizedByte4
      • NormalizedShort2
      • NormalizedShort4
      • PixelAlphaCompositionMode
      • PixelAlphaRepresentation
      • PixelBlender<TPixel>
      • PixelColorBlendingMode
      • PixelConversionModifiers
      • PixelOperations<TPixel>
      • Rg32
      • Rgb24
      • Rgb48
      • Rgba1010102
      • Rgba32
      • Rgba64
      • RgbaVector
      • Short2
      • Short4
    • SixLabors.ImageSharp.Processing
      • AdaptiveThresholdExtensions
      • AffineTransformBuilder
      • AnchorPositionMode
      • AutoOrientExtensions
      • BackgroundColorExtensions
      • BinaryDitherExtensions
      • BinaryThresholdExtensions
      • BinaryThresholdMode
      • BlackWhiteExtensions
      • BokehBlurExtensions
      • BoxBlurExtensions
      • BrightnessExtensions
      • ColorBlindnessExtensions
      • ColorBlindnessMode
      • ContrastExtensions
      • CropExtensions
      • DetectEdgesExtensions
      • DitherExtensions
      • DrawImageExtensions
      • EntropyCropExtensions
      • FilterExtensions
      • FlipExtensions
      • FlipMode
      • GaussianBlurExtensions
      • GaussianSharpenExtensions
      • GlowExtensions
      • GrayscaleExtensions
      • GrayscaleMode
      • HistogramEqualizationExtensions
      • HueExtensions
      • IImageProcessingContext
      • InvertExtensions
      • KnownDitherings
      • KnownEdgeDetectorKernels
      • KnownFilterMatrices
      • KnownQuantizers
      • KnownResamplers
      • KodachromeExtensions
      • LightnessExtensions
      • LomographExtensions
      • OilPaintExtensions
      • OpacityExtensions
      • PadExtensions
      • PixelateExtensions
      • PixelRowDelegateExtensions
      • PixelRowOperation
      • PixelRowOperation<T>
      • PolaroidExtensions
      • ProcessingExtensions
      • ProjectiveTransformBuilder
      • QuantizeExtensions
      • ResizeExtensions
      • ResizeMode
      • ResizeOptions
      • RotateExtensions
      • RotateFlipExtensions
      • RotateMode
      • SaturateExtensions
      • SepiaExtensions
      • SkewExtensions
      • TaperCorner
      • TaperSide
      • TransformExtensions
      • VignetteExtensions
    • SixLabors.ImageSharp.Processing.Extensions.Transforms
      • SwizzleExtensions
    • SixLabors.ImageSharp.Processing.Processors
      • CloningImageProcessor
      • CloningImageProcessor<TPixel>
      • ICloningImageProcessor
      • ICloningImageProcessor<TPixel>
      • IImageProcessor
      • IImageProcessor<TPixel>
      • ImageProcessor<TPixel>
    • SixLabors.ImageSharp.Processing.Processors.Binarization
      • AdaptiveThresholdProcessor
      • BinaryThresholdProcessor
    • SixLabors.ImageSharp.Processing.Processors.Convolution
      • BokehBlurProcessor
      • BoxBlurProcessor
      • EdgeDetector2DKernel
      • EdgeDetector2DProcessor
      • EdgeDetectorCompassKernel
      • EdgeDetectorCompassProcessor
      • EdgeDetectorKernel
      • EdgeDetectorProcessor
      • GaussianBlurProcessor
      • GaussianSharpenProcessor
    • SixLabors.ImageSharp.Processing.Processors.Dithering
      • ErrorDither
      • IDither
      • IPaletteDitherImageProcessor<TPixel>
      • OrderedDither
      • PaletteDitherProcessor
    • SixLabors.ImageSharp.Processing.Processors.Drawing
      • DrawImageProcessor
    • SixLabors.ImageSharp.Processing.Processors.Effects
      • IPixelRowDelegate
      • OilPaintingProcessor
      • PixelateProcessor
    • SixLabors.ImageSharp.Processing.Processors.Filters
      • AchromatomalyProcessor
      • AchromatopsiaProcessor
      • BlackWhiteProcessor
      • BrightnessProcessor
      • ContrastProcessor
      • DeuteranomalyProcessor
      • DeuteranopiaProcessor
      • FilterProcessor
      • GrayscaleBt601Processor
      • GrayscaleBt709Processor
      • HueProcessor
      • InvertProcessor
      • KodachromeProcessor
      • LightnessProcessor
      • LomographProcessor
      • OpacityProcessor
      • PolaroidProcessor
      • ProtanomalyProcessor
      • ProtanopiaProcessor
      • SaturateProcessor
      • SepiaProcessor
      • TritanomalyProcessor
      • TritanopiaProcessor
    • SixLabors.ImageSharp.Processing.Processors.Normalization
      • AdaptiveHistogramEqualizationProcessor
      • AdaptiveHistogramEqualizationSlidingWindowProcessor
      • GlobalHistogramEqualizationProcessor
      • HistogramEqualizationMethod
      • HistogramEqualizationOptions
      • HistogramEqualizationProcessor
    • SixLabors.ImageSharp.Processing.Processors.Overlays
      • BackgroundColorProcessor
      • GlowProcessor
      • VignetteProcessor
    • SixLabors.ImageSharp.Processing.Processors.Quantization
      • DefaultPixelSamplingStrategy
      • ExtensivePixelSamplingStrategy
      • IPixelSamplingStrategy
      • IQuantizer
      • IQuantizer<TPixel>
      • OctreeQuantizer
      • OctreeQuantizer<TPixel>
      • PaletteQuantizer
      • QuantizeProcessor
      • QuantizerConstants
      • QuantizerOptions
      • QuantizerUtilities
      • WebSafePaletteQuantizer
      • WernerPaletteQuantizer
      • WuQuantizer
    • SixLabors.ImageSharp.Processing.Processors.Transforms
      • AffineTransformProcessor
      • AutoOrientProcessor
      • BicubicResampler
      • BoxResampler
      • CropProcessor
      • CubicResampler
      • DegenerateTransformException
      • EntropyCropProcessor
      • FlipProcessor
      • IResampler
      • IResamplingTransformImageProcessor<TPixel>
      • ISwizzler
      • LanczosResampler
      • NearestNeighborResampler
      • ProjectiveTransformProcessor
      • ResizeProcessor
      • RotateProcessor
      • SkewProcessor
      • SwizzleProcessor<TSwizzler>
      • TriangleResampler
      • WelchResampler

    Struct Color

    Represents a color value that is convertible to any IPixel<TSelf> type.

    Implements
    IEquatable<Color>
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: SixLabors.ImageSharp
    Assembly: SixLabors.ImageSharp.dll
    Syntax
    public readonly struct Color : IEquatable<Color>
    Remarks

    The internal representation and layout of this structure is hidden by intention. It's not serializable, and it should not be considered as part of a contract. Unlike System.Drawing.Color, Color has to be converted to a specific pixel value to query the color components.

    Constructors

    | Improve this Doc View Source

    Color(Argb32)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Argb32 pixel)
    Parameters
    Type Name Description
    Argb32 pixel

    The Argb32 containing the color information.

    | Improve this Doc View Source

    Color(Bgr24)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Bgr24 pixel)
    Parameters
    Type Name Description
    Bgr24 pixel

    The Bgr24 containing the color information.

    | Improve this Doc View Source

    Color(Bgra32)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Bgra32 pixel)
    Parameters
    Type Name Description
    Bgra32 pixel

    The Bgra32 containing the color information.

    | Improve this Doc View Source

    Color(Rgb24)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Rgb24 pixel)
    Parameters
    Type Name Description
    Rgb24 pixel

    The Rgb24 containing the color information.

    | Improve this Doc View Source

    Color(Rgba32)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Rgba32 pixel)
    Parameters
    Type Name Description
    Rgba32 pixel

    The Rgba32 containing the color information.

    | Improve this Doc View Source

    Color(Rgba64)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Rgba64 pixel)
    Parameters
    Type Name Description
    Rgba64 pixel

    The Rgba64 containing the color information.

    | Improve this Doc View Source

    Color(Vector4)

    Initializes a new instance of the Color struct.

    Declaration
    public Color(Vector4 vector)
    Parameters
    Type Name Description
    Vector4 vector

    The Vector4 containing the color information.

    Fields

    | Improve this Doc View Source

    AliceBlue

    Represents a matching the W3C definition that has an hex value of #F0F8FF.

    Declaration
    public static readonly Color AliceBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    AntiqueWhite

    Represents a matching the W3C definition that has an hex value of #FAEBD7.

    Declaration
    public static readonly Color AntiqueWhite
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Aqua

    Represents a matching the W3C definition that has an hex value of #00FFFF.

    Declaration
    public static readonly Color Aqua
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Aquamarine

    Represents a matching the W3C definition that has an hex value of #7FFFD4.

    Declaration
    public static readonly Color Aquamarine
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Azure

    Represents a matching the W3C definition that has an hex value of #F0FFFF.

    Declaration
    public static readonly Color Azure
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Beige

    Represents a matching the W3C definition that has an hex value of #F5F5DC.

    Declaration
    public static readonly Color Beige
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Bisque

    Represents a matching the W3C definition that has an hex value of #FFE4C4.

    Declaration
    public static readonly Color Bisque
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Black

    Represents a matching the W3C definition that has an hex value of #000000.

    Declaration
    public static readonly Color Black
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    BlanchedAlmond

    Represents a matching the W3C definition that has an hex value of #FFEBCD.

    Declaration
    public static readonly Color BlanchedAlmond
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Blue

    Represents a matching the W3C definition that has an hex value of #0000FF.

    Declaration
    public static readonly Color Blue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    BlueViolet

    Represents a matching the W3C definition that has an hex value of #8A2BE2.

    Declaration
    public static readonly Color BlueViolet
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Brown

    Represents a matching the W3C definition that has an hex value of #A52A2A.

    Declaration
    public static readonly Color Brown
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    BurlyWood

    Represents a matching the W3C definition that has an hex value of #DEB887.

    Declaration
    public static readonly Color BurlyWood
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    CadetBlue

    Represents a matching the W3C definition that has an hex value of #5F9EA0.

    Declaration
    public static readonly Color CadetBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Chartreuse

    Represents a matching the W3C definition that has an hex value of #7FFF00.

    Declaration
    public static readonly Color Chartreuse
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Chocolate

    Represents a matching the W3C definition that has an hex value of #D2691E.

    Declaration
    public static readonly Color Chocolate
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Coral

    Represents a matching the W3C definition that has an hex value of #FF7F50.

    Declaration
    public static readonly Color Coral
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    CornflowerBlue

    Represents a matching the W3C definition that has an hex value of #6495ED.

    Declaration
    public static readonly Color CornflowerBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Cornsilk

    Represents a matching the W3C definition that has an hex value of #FFF8DC.

    Declaration
    public static readonly Color Cornsilk
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Crimson

    Represents a matching the W3C definition that has an hex value of #DC143C.

    Declaration
    public static readonly Color Crimson
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Cyan

    Represents a matching the W3C definition that has an hex value of #00FFFF.

    Declaration
    public static readonly Color Cyan
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkBlue

    Represents a matching the W3C definition that has an hex value of #00008B.

    Declaration
    public static readonly Color DarkBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkCyan

    Represents a matching the W3C definition that has an hex value of #008B8B.

    Declaration
    public static readonly Color DarkCyan
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkGoldenrod

    Represents a matching the W3C definition that has an hex value of #B8860B.

    Declaration
    public static readonly Color DarkGoldenrod
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkGray

    Represents a matching the W3C definition that has an hex value of #A9A9A9.

    Declaration
    public static readonly Color DarkGray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkGreen

    Represents a matching the W3C definition that has an hex value of #006400.

    Declaration
    public static readonly Color DarkGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkGrey

    Represents a matching the W3C definition that has an hex value of #A9A9A9.

    Declaration
    public static readonly Color DarkGrey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkKhaki

    Represents a matching the W3C definition that has an hex value of #BDB76B.

    Declaration
    public static readonly Color DarkKhaki
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkMagenta

    Represents a matching the W3C definition that has an hex value of #8B008B.

    Declaration
    public static readonly Color DarkMagenta
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkOliveGreen

    Represents a matching the W3C definition that has an hex value of #556B2F.

    Declaration
    public static readonly Color DarkOliveGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkOrange

    Represents a matching the W3C definition that has an hex value of #FF8C00.

    Declaration
    public static readonly Color DarkOrange
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkOrchid

    Represents a matching the W3C definition that has an hex value of #9932CC.

    Declaration
    public static readonly Color DarkOrchid
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkRed

    Represents a matching the W3C definition that has an hex value of #8B0000.

    Declaration
    public static readonly Color DarkRed
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkSalmon

    Represents a matching the W3C definition that has an hex value of #E9967A.

    Declaration
    public static readonly Color DarkSalmon
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkSeaGreen

    Represents a matching the W3C definition that has an hex value of #8FBC8F.

    Declaration
    public static readonly Color DarkSeaGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkSlateBlue

    Represents a matching the W3C definition that has an hex value of #483D8B.

    Declaration
    public static readonly Color DarkSlateBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkSlateGray

    Represents a matching the W3C definition that has an hex value of #2F4F4F.

    Declaration
    public static readonly Color DarkSlateGray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkSlateGrey

    Represents a matching the W3C definition that has an hex value of #2F4F4F.

    Declaration
    public static readonly Color DarkSlateGrey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkTurquoise

    Represents a matching the W3C definition that has an hex value of #00CED1.

    Declaration
    public static readonly Color DarkTurquoise
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DarkViolet

    Represents a matching the W3C definition that has an hex value of #9400D3.

    Declaration
    public static readonly Color DarkViolet
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DeepPink

    Represents a matching the W3C definition that has an hex value of #FF1493.

    Declaration
    public static readonly Color DeepPink
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DeepSkyBlue

    Represents a matching the W3C definition that has an hex value of #00BFFF.

    Declaration
    public static readonly Color DeepSkyBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DimGray

    Represents a matching the W3C definition that has an hex value of #696969.

    Declaration
    public static readonly Color DimGray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DimGrey

    Represents a matching the W3C definition that has an hex value of #696969.

    Declaration
    public static readonly Color DimGrey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    DodgerBlue

    Represents a matching the W3C definition that has an hex value of #1E90FF.

    Declaration
    public static readonly Color DodgerBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Firebrick

    Represents a matching the W3C definition that has an hex value of #B22222.

    Declaration
    public static readonly Color Firebrick
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    FloralWhite

    Represents a matching the W3C definition that has an hex value of #FFFAF0.

    Declaration
    public static readonly Color FloralWhite
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    ForestGreen

    Represents a matching the W3C definition that has an hex value of #228B22.

    Declaration
    public static readonly Color ForestGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Fuchsia

    Represents a matching the W3C definition that has an hex value of #FF00FF.

    Declaration
    public static readonly Color Fuchsia
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Gainsboro

    Represents a matching the W3C definition that has an hex value of #DCDCDC.

    Declaration
    public static readonly Color Gainsboro
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    GhostWhite

    Represents a matching the W3C definition that has an hex value of #F8F8FF.

    Declaration
    public static readonly Color GhostWhite
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Gold

    Represents a matching the W3C definition that has an hex value of #FFD700.

    Declaration
    public static readonly Color Gold
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Goldenrod

    Represents a matching the W3C definition that has an hex value of #DAA520.

    Declaration
    public static readonly Color Goldenrod
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Gray

    Represents a matching the W3C definition that has an hex value of #808080.

    Declaration
    public static readonly Color Gray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Green

    Represents a matching the W3C definition that has an hex value of #008000.

    Declaration
    public static readonly Color Green
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    GreenYellow

    Represents a matching the W3C definition that has an hex value of #ADFF2F.

    Declaration
    public static readonly Color GreenYellow
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Grey

    Represents a matching the W3C definition that has an hex value of #808080.

    Declaration
    public static readonly Color Grey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Honeydew

    Represents a matching the W3C definition that has an hex value of #F0FFF0.

    Declaration
    public static readonly Color Honeydew
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    HotPink

    Represents a matching the W3C definition that has an hex value of #FF69B4.

    Declaration
    public static readonly Color HotPink
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    IndianRed

    Represents a matching the W3C definition that has an hex value of #CD5C5C.

    Declaration
    public static readonly Color IndianRed
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Indigo

    Represents a matching the W3C definition that has an hex value of #4B0082.

    Declaration
    public static readonly Color Indigo
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Ivory

    Represents a matching the W3C definition that has an hex value of #FFFFF0.

    Declaration
    public static readonly Color Ivory
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Khaki

    Represents a matching the W3C definition that has an hex value of #F0E68C.

    Declaration
    public static readonly Color Khaki
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Lavender

    Represents a matching the W3C definition that has an hex value of #E6E6FA.

    Declaration
    public static readonly Color Lavender
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LavenderBlush

    Represents a matching the W3C definition that has an hex value of #FFF0F5.

    Declaration
    public static readonly Color LavenderBlush
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LawnGreen

    Represents a matching the W3C definition that has an hex value of #7CFC00.

    Declaration
    public static readonly Color LawnGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LemonChiffon

    Represents a matching the W3C definition that has an hex value of #FFFACD.

    Declaration
    public static readonly Color LemonChiffon
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightBlue

    Represents a matching the W3C definition that has an hex value of #ADD8E6.

    Declaration
    public static readonly Color LightBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightCoral

    Represents a matching the W3C definition that has an hex value of #F08080.

    Declaration
    public static readonly Color LightCoral
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightCyan

    Represents a matching the W3C definition that has an hex value of #E0FFFF.

    Declaration
    public static readonly Color LightCyan
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightGoldenrodYellow

    Represents a matching the W3C definition that has an hex value of #FAFAD2.

    Declaration
    public static readonly Color LightGoldenrodYellow
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightGray

    Represents a matching the W3C definition that has an hex value of #D3D3D3.

    Declaration
    public static readonly Color LightGray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightGreen

    Represents a matching the W3C definition that has an hex value of #90EE90.

    Declaration
    public static readonly Color LightGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightGrey

    Represents a matching the W3C definition that has an hex value of #D3D3D3.

    Declaration
    public static readonly Color LightGrey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightPink

    Represents a matching the W3C definition that has an hex value of #FFB6C1.

    Declaration
    public static readonly Color LightPink
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightSalmon

    Represents a matching the W3C definition that has an hex value of #FFA07A.

    Declaration
    public static readonly Color LightSalmon
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightSeaGreen

    Represents a matching the W3C definition that has an hex value of #20B2AA.

    Declaration
    public static readonly Color LightSeaGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightSkyBlue

    Represents a matching the W3C definition that has an hex value of #87CEFA.

    Declaration
    public static readonly Color LightSkyBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightSlateGray

    Represents a matching the W3C definition that has an hex value of #778899.

    Declaration
    public static readonly Color LightSlateGray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightSlateGrey

    Represents a matching the W3C definition that has an hex value of #778899.

    Declaration
    public static readonly Color LightSlateGrey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightSteelBlue

    Represents a matching the W3C definition that has an hex value of #B0C4DE.

    Declaration
    public static readonly Color LightSteelBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LightYellow

    Represents a matching the W3C definition that has an hex value of #FFFFE0.

    Declaration
    public static readonly Color LightYellow
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Lime

    Represents a matching the W3C definition that has an hex value of #00FF00.

    Declaration
    public static readonly Color Lime
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    LimeGreen

    Represents a matching the W3C definition that has an hex value of #32CD32.

    Declaration
    public static readonly Color LimeGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Linen

    Represents a matching the W3C definition that has an hex value of #FAF0E6.

    Declaration
    public static readonly Color Linen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Magenta

    Represents a matching the W3C definition that has an hex value of #FF00FF.

    Declaration
    public static readonly Color Magenta
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Maroon

    Represents a matching the W3C definition that has an hex value of #800000.

    Declaration
    public static readonly Color Maroon
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumAquamarine

    Represents a matching the W3C definition that has an hex value of #66CDAA.

    Declaration
    public static readonly Color MediumAquamarine
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumBlue

    Represents a matching the W3C definition that has an hex value of #0000CD.

    Declaration
    public static readonly Color MediumBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumOrchid

    Represents a matching the W3C definition that has an hex value of #BA55D3.

    Declaration
    public static readonly Color MediumOrchid
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumPurple

    Represents a matching the W3C definition that has an hex value of #9370DB.

    Declaration
    public static readonly Color MediumPurple
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumSeaGreen

    Represents a matching the W3C definition that has an hex value of #3CB371.

    Declaration
    public static readonly Color MediumSeaGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumSlateBlue

    Represents a matching the W3C definition that has an hex value of #7B68EE.

    Declaration
    public static readonly Color MediumSlateBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumSpringGreen

    Represents a matching the W3C definition that has an hex value of #00FA9A.

    Declaration
    public static readonly Color MediumSpringGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumTurquoise

    Represents a matching the W3C definition that has an hex value of #48D1CC.

    Declaration
    public static readonly Color MediumTurquoise
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MediumVioletRed

    Represents a matching the W3C definition that has an hex value of #C71585.

    Declaration
    public static readonly Color MediumVioletRed
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MidnightBlue

    Represents a matching the W3C definition that has an hex value of #191970.

    Declaration
    public static readonly Color MidnightBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MintCream

    Represents a matching the W3C definition that has an hex value of #F5FFFA.

    Declaration
    public static readonly Color MintCream
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    MistyRose

    Represents a matching the W3C definition that has an hex value of #FFE4E1.

    Declaration
    public static readonly Color MistyRose
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Moccasin

    Represents a matching the W3C definition that has an hex value of #FFE4B5.

    Declaration
    public static readonly Color Moccasin
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    NavajoWhite

    Represents a matching the W3C definition that has an hex value of #FFDEAD.

    Declaration
    public static readonly Color NavajoWhite
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Navy

    Represents a matching the W3C definition that has an hex value of #000080.

    Declaration
    public static readonly Color Navy
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    OldLace

    Represents a matching the W3C definition that has an hex value of #FDF5E6.

    Declaration
    public static readonly Color OldLace
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Olive

    Represents a matching the W3C definition that has an hex value of #808000.

    Declaration
    public static readonly Color Olive
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    OliveDrab

    Represents a matching the W3C definition that has an hex value of #6B8E23.

    Declaration
    public static readonly Color OliveDrab
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Orange

    Represents a matching the W3C definition that has an hex value of #FFA500.

    Declaration
    public static readonly Color Orange
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    OrangeRed

    Represents a matching the W3C definition that has an hex value of #FF4500.

    Declaration
    public static readonly Color OrangeRed
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Orchid

    Represents a matching the W3C definition that has an hex value of #DA70D6.

    Declaration
    public static readonly Color Orchid
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PaleGoldenrod

    Represents a matching the W3C definition that has an hex value of #EEE8AA.

    Declaration
    public static readonly Color PaleGoldenrod
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PaleGreen

    Represents a matching the W3C definition that has an hex value of #98FB98.

    Declaration
    public static readonly Color PaleGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PaleTurquoise

    Represents a matching the W3C definition that has an hex value of #AFEEEE.

    Declaration
    public static readonly Color PaleTurquoise
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PaleVioletRed

    Represents a matching the W3C definition that has an hex value of #DB7093.

    Declaration
    public static readonly Color PaleVioletRed
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PapayaWhip

    Represents a matching the W3C definition that has an hex value of #FFEFD5.

    Declaration
    public static readonly Color PapayaWhip
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PeachPuff

    Represents a matching the W3C definition that has an hex value of #FFDAB9.

    Declaration
    public static readonly Color PeachPuff
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Peru

    Represents a matching the W3C definition that has an hex value of #CD853F.

    Declaration
    public static readonly Color Peru
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Pink

    Represents a matching the W3C definition that has an hex value of #FFC0CB.

    Declaration
    public static readonly Color Pink
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Plum

    Represents a matching the W3C definition that has an hex value of #DDA0DD.

    Declaration
    public static readonly Color Plum
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    PowderBlue

    Represents a matching the W3C definition that has an hex value of #B0E0E6.

    Declaration
    public static readonly Color PowderBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Purple

    Represents a matching the W3C definition that has an hex value of #800080.

    Declaration
    public static readonly Color Purple
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    RebeccaPurple

    Represents a matching the W3C definition that has an hex value of #663399.

    Declaration
    public static readonly Color RebeccaPurple
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Red

    Represents a matching the W3C definition that has an hex value of #FF0000.

    Declaration
    public static readonly Color Red
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    RosyBrown

    Represents a matching the W3C definition that has an hex value of #BC8F8F.

    Declaration
    public static readonly Color RosyBrown
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    RoyalBlue

    Represents a matching the W3C definition that has an hex value of #4169E1.

    Declaration
    public static readonly Color RoyalBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SaddleBrown

    Represents a matching the W3C definition that has an hex value of #8B4513.

    Declaration
    public static readonly Color SaddleBrown
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Salmon

    Represents a matching the W3C definition that has an hex value of #FA8072.

    Declaration
    public static readonly Color Salmon
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SandyBrown

    Represents a matching the W3C definition that has an hex value of #F4A460.

    Declaration
    public static readonly Color SandyBrown
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SeaGreen

    Represents a matching the W3C definition that has an hex value of #2E8B57.

    Declaration
    public static readonly Color SeaGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SeaShell

    Represents a matching the W3C definition that has an hex value of #FFF5EE.

    Declaration
    public static readonly Color SeaShell
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Sienna

    Represents a matching the W3C definition that has an hex value of #A0522D.

    Declaration
    public static readonly Color Sienna
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Silver

    Represents a matching the W3C definition that has an hex value of #C0C0C0.

    Declaration
    public static readonly Color Silver
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SkyBlue

    Represents a matching the W3C definition that has an hex value of #87CEEB.

    Declaration
    public static readonly Color SkyBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SlateBlue

    Represents a matching the W3C definition that has an hex value of #6A5ACD.

    Declaration
    public static readonly Color SlateBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SlateGray

    Represents a matching the W3C definition that has an hex value of #708090.

    Declaration
    public static readonly Color SlateGray
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SlateGrey

    Represents a matching the W3C definition that has an hex value of #708090.

    Declaration
    public static readonly Color SlateGrey
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Snow

    Represents a matching the W3C definition that has an hex value of #FFFAFA.

    Declaration
    public static readonly Color Snow
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SpringGreen

    Represents a matching the W3C definition that has an hex value of #00FF7F.

    Declaration
    public static readonly Color SpringGreen
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    SteelBlue

    Represents a matching the W3C definition that has an hex value of #4682B4.

    Declaration
    public static readonly Color SteelBlue
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Tan

    Represents a matching the W3C definition that has an hex value of #D2B48C.

    Declaration
    public static readonly Color Tan
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Teal

    Represents a matching the W3C definition that has an hex value of #008080.

    Declaration
    public static readonly Color Teal
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Thistle

    Represents a matching the W3C definition that has an hex value of #D8BFD8.

    Declaration
    public static readonly Color Thistle
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Tomato

    Represents a matching the W3C definition that has an hex value of #FF6347.

    Declaration
    public static readonly Color Tomato
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Transparent

    Represents a matching the W3C definition that has an hex value of #00000000.

    Declaration
    public static readonly Color Transparent
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Turquoise

    Represents a matching the W3C definition that has an hex value of #40E0D0.

    Declaration
    public static readonly Color Turquoise
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Violet

    Represents a matching the W3C definition that has an hex value of #EE82EE.

    Declaration
    public static readonly Color Violet
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Wheat

    Represents a matching the W3C definition that has an hex value of #F5DEB3.

    Declaration
    public static readonly Color Wheat
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    White

    Represents a matching the W3C definition that has an hex value of #FFFFFF.

    Declaration
    public static readonly Color White
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    WhiteSmoke

    Represents a matching the W3C definition that has an hex value of #F5F5F5.

    Declaration
    public static readonly Color WhiteSmoke
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    Yellow

    Represents a matching the W3C definition that has an hex value of #FFFF00.

    Declaration
    public static readonly Color Yellow
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    YellowGreen

    Represents a matching the W3C definition that has an hex value of #9ACD32.

    Declaration
    public static readonly Color YellowGreen
    Field Value
    Type Description
    Color

    Properties

    | Improve this Doc View Source

    WebSafePalette

    Gets a collection of named, web safe colors as defined in the CSS Color Module Level 4.

    Declaration
    public static readonly ReadOnlyMemory<Color> WebSafePalette { get; }
    Property Value
    Type Description
    ReadOnlyMemory<Color>
    | Improve this Doc View Source

    WernerPalette

    Gets a collection of colors as defined in the original second edition of Werner’s Nomenclature of Colours 1821. The hex codes were collected and defined by Nicholas Rougeux https://www.c82.net/werner.

    Declaration
    public static readonly ReadOnlyMemory<Color> WernerPalette { get; }
    Property Value
    Type Description
    ReadOnlyMemory<Color>

    Methods

    | Improve this Doc View Source

    Equals(Color)

    Declaration
    public readonly bool Equals(Color other)
    Parameters
    Type Name Description
    Color other
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)
    | Improve this Doc View Source

    FromRgb(Byte, Byte, Byte)

    Creates a Color from RGB bytes.

    Declaration
    public static Color FromRgb(byte r, byte g, byte b)
    Parameters
    Type Name Description
    Byte r

    The red component (0-255).

    Byte g

    The green component (0-255).

    Byte b

    The blue component (0-255).

    Returns
    Type Description
    Color

    The Color.

    | Improve this Doc View Source

    FromRgba(Byte, Byte, Byte, Byte)

    Creates a Color from RGBA bytes.

    Declaration
    public static Color FromRgba(byte r, byte g, byte b, byte a)
    Parameters
    Type Name Description
    Byte r

    The red component (0-255).

    Byte g

    The green component (0-255).

    Byte b

    The blue component (0-255).

    Byte a

    The alpha component (0-255).

    Returns
    Type Description
    Color

    The Color.

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    | Improve this Doc View Source

    Parse(String)

    Creates a new instance of the Color struct from the given input string.

    Declaration
    public static Color Parse(string input)
    Parameters
    Type Name Description
    String input

    The name of the color or the hexadecimal representation of the combined color components arranged in rgb, rgba, rrggbb, or rrggbbaa format to match web syntax.

    Returns
    Type Description
    Color

    The Color.

    | Improve this Doc View Source

    ParseHex(String)

    Creates a new instance of the Color struct from the given hexadecimal string.

    Declaration
    public static Color ParseHex(string hex)
    Parameters
    Type Name Description
    String hex

    The hexadecimal representation of the combined color components arranged in rgb, rgba, rrggbb, or rrggbbaa format to match web syntax.

    Returns
    Type Description
    Color

    The Color.

    | Improve this Doc View Source

    ToHex()

    Gets the hexadecimal representation of the color instance in rrggbbaa form.

    Declaration
    public readonly string ToHex()
    Returns
    Type Description
    String

    A hexadecimal string representation of the value.

    | Improve this Doc View Source

    ToPixel<TPixel>()

    Converts the color instance to a specified IPixel<TSelf> type.

    Declaration
    public readonly TPixel ToPixel<TPixel>()
        where TPixel : struct, IPixel<TPixel>
    Returns
    Type Description
    TPixel

    The pixel value.

    Type Parameters
    Name Description
    TPixel

    The pixel type to convert to.

    | Improve this Doc View Source

    ToPixel<TPixel>(Configuration, ReadOnlySpan<Color>, Span<TPixel>)

    Bulk converts a span of Color to a span of a specified IPixel<TSelf> type.

    Declaration
    public static void ToPixel<TPixel>(Configuration configuration, ReadOnlySpan<Color> source, Span<TPixel> destination)
        where TPixel : struct, IPixel<TPixel>
    Parameters
    Type Name Description
    Configuration configuration

    The configuration.

    ReadOnlySpan<Color> source

    The source color span.

    Span<TPixel> destination

    The destination pixel span.

    Type Parameters
    Name Description
    TPixel

    The pixel type to convert to.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()
    | Improve this Doc View Source

    TryParse(String, out Color)

    Attempts to creates a new instance of the Color struct from the given input string.

    Declaration
    public static bool TryParse(string input, out Color result)
    Parameters
    Type Name Description
    String input

    The name of the color or the hexadecimal representation of the combined color components arranged in rgb, rgba, rrggbb, or rrggbbaa format to match web syntax.

    Color result

    When this method returns, contains the Color equivalent of the hexadecimal input.

    Returns
    Type Description
    Boolean

    The Boolean.

    | Improve this Doc View Source

    TryParseHex(String, out Color)

    Attempts to creates a new instance of the Color struct from the given hexadecimal string.

    Declaration
    public static bool TryParseHex(string hex, out Color result)
    Parameters
    Type Name Description
    String hex

    The hexadecimal representation of the combined color components arranged in rgb, rgba, rrggbb, or rrggbbaa format to match web syntax.

    Color result

    When this method returns, contains the Color equivalent of the hexadecimal input.

    Returns
    Type Description
    Boolean

    The Boolean.

    | Improve this Doc View Source

    WithAlpha(Single)

    Alters the alpha channel of the color, returning a new instance.

    Declaration
    public readonly Color WithAlpha(float alpha)
    Parameters
    Type Name Description
    Single alpha

    The new value of alpha [0..1].

    Returns
    Type Description
    Color

    The color having it's alpha channel altered.

    Operators

    | Improve this Doc View Source

    Equality(Color, Color)

    Checks whether two Color structures are equal.

    Declaration
    public static bool operator ==(Color left, Color right)
    Parameters
    Type Name Description
    Color left

    The left hand Color operand.

    Color right

    The right hand Color operand.

    Returns
    Type Description
    Boolean

    True if the left parameter is equal to the right parameter; otherwise, false.

    | Improve this Doc View Source

    Explicit(Color to Vector4)

    Converts a Color to Vector4.

    Declaration
    public static explicit operator Vector4(Color color)
    Parameters
    Type Name Description
    Color color

    The Color.

    Returns
    Type Description
    Vector4

    The Vector4.

    | Improve this Doc View Source

    Explicit(Vector4 to Color)

    Converts an Vector4 to Color.

    Declaration
    public static explicit operator Color(Vector4 source)
    Parameters
    Type Name Description
    Vector4 source

    The Vector4.

    Returns
    Type Description
    Color

    The Color.

    | Improve this Doc View Source

    Inequality(Color, Color)

    Checks whether two Color structures are equal.

    Declaration
    public static bool operator !=(Color left, Color right)
    Parameters
    Type Name Description
    Color left

    The left hand Color operand.

    Color right

    The right hand Color operand.

    Returns
    Type Description
    Boolean

    True if the left parameter is not equal to the right parameter; otherwise, false.

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX