• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • JeremyAnsel.DirectX.D2D1
      • D2D1AlphaMode
      • D2D1AntialiasMode
      • D2D1ArcSegment
      • D2D1ArcSize
      • D2D1BezierSegment
      • D2D1Bitmap
      • D2D1BitmapBrush
      • D2D1BitmapBrushProperties
      • D2D1BitmapInterpolationMode
      • D2D1BitmapProperties
      • D2D1BitmapRenderTarget
      • D2D1Brush
      • D2D1BrushProperties
      • D2D1CapStyle
      • D2D1ColorF
      • D2D1CombineMode
      • D2D1CompatibleRenderTargetOptions
      • D2D1Constants
      • D2D1DCInitializeMode
      • D2D1DCRenderTarget
      • D2D1DashStyle
      • D2D1DebugLevel
      • D2D1DrawTextOptions
      • D2D1DrawingStateBlock
      • D2D1DrawingStateDescription
      • D2D1Ellipse
      • D2D1EllipseGeometry
      • D2D1Error
      • D2D1ExtendMode
      • D2D1Factory
      • D2D1FactoryOptions
      • D2D1FactoryType
      • D2D1FeatureLevel
      • D2D1FigureBegin
      • D2D1FigureEnd
      • D2D1FillMode
      • D2D1Gamma
      • D2D1Geometry
      • D2D1GeometryGroup
      • D2D1GeometryRelation
      • D2D1GeometrySimplificationOption
      • D2D1GeometrySink
      • D2D1GradientStop
      • D2D1GradientStopCollection
      • D2D1HwndRenderTarget
      • D2D1HwndRenderTargetProperties
      • D2D1Image
      • D2D1InterpolationModeDefinition
      • D2D1KnownColor
      • D2D1Layer
      • D2D1LayerOptions
      • D2D1LayerParameters
      • D2D1LineJoin
      • D2D1LinearGradientBrush
      • D2D1LinearGradientBrushProperties
      • D2D1Matrix3X2F
      • D2D1Matrix4X3F
      • D2D1Matrix4X4F
      • D2D1Matrix5X4F
      • D2D1Mesh
      • D2D1OpacityMaskContent
      • D2D1PathGeometry
      • D2D1PathSegmentOptions
      • D2D1PixelFormat
      • D2D1Point2F
      • D2D1Point2L
      • D2D1Point2U
      • D2D1PresentOptions
      • D2D1QuadraticBezierSegment
      • D2D1RadialGradientBrush
      • D2D1RadialGradientBrushProperties
      • D2D1RectF
      • D2D1RectL
      • D2D1RectU
      • D2D1RectangleGeometry
      • D2D1RenderTarget
      • D2D1RenderTargetProperties
      • D2D1RenderTargetType
      • D2D1RenderTargetUsages
      • D2D1Resource
      • D2D1RoundedRect
      • D2D1RoundedRectangleGeometry
      • D2D1SimplifiedGeometrySink
      • D2D1SizeF
      • D2D1SizeU
      • D2D1SolidColorBrush
      • D2D1StrokeStyle
      • D2D1StrokeStyleProperties
      • D2D1SweepDirection
      • D2D1TessellationSink
      • D2D1TextAntialiasMode
      • D2D1TransformedGeometry
      • D2D1Triangle
      • D2D1Utils
      • D2D1Vector2F
      • D2D1Vector3F
      • D2D1Vector4F
      • D2D1WindowStates
      • ID2D1Releasable
    • JeremyAnsel.DirectX.D3D10
      • D3D10CreateDeviceOptions
      • D3D10Device1
      • D3D10DriverType
      • D3D10Error
      • D3D10FeatureLevel
      • D3D10Utils
      • ID3D10Releasable
    • JeremyAnsel.DirectX.D3D11
      • D3D11AsyncGetDataOptions
      • D3D11Asynchronous
      • D3D11BindOptions
      • D3D11BlendDesc
      • D3D11BlendOperation
      • D3D11BlendState
      • D3D11BlendValue
      • D3D11Box
      • D3D11Buffer
      • D3D11BufferDesc
      • D3D11BufferExSrv
      • D3D11BufferExSrvOptions
      • D3D11BufferRtv
      • D3D11BufferSrv
      • D3D11BufferUav
      • D3D11BufferUavOptions
      • D3D11ClassInstance
      • D3D11ClassInstanceDesc
      • D3D11ClassLinkage
      • D3D11ClearOptions
      • D3D11ColorWriteEnables
      • D3D11CommandList
      • D3D11ComparisonFunction
      • D3D11ComputeShader
      • D3D11Constants
      • D3D11Counter
      • D3D11CounterDataType
      • D3D11CounterDesc
      • D3D11CounterInfo
      • D3D11CounterType
      • D3D11CpuAccessOptions
      • D3D11CreateDeviceOptions
      • D3D11CullMode
      • D3D11DepthStencilDesc
      • D3D11DepthStencilOperationDesc
      • D3D11DepthStencilState
      • D3D11DepthStencilView
      • D3D11DepthStencilViewDesc
      • D3D11DepthStencilViewOptions
      • D3D11DepthWriteMask
      • D3D11Device
      • D3D11DeviceChild
      • D3D11DeviceContext
      • D3D11DeviceContextType
      • D3D11DomainShader
      • D3D11DriverType
      • D3D11DsvDimension
      • D3D11Error
      • D3D11Feature
      • D3D11FeatureDataArchitectureInfo
      • D3D11FeatureDataD3D10XHardwareOptions
      • D3D11FeatureDataD3D11Options
      • D3D11FeatureDataD3D11Options1
      • D3D11FeatureDataD3D9Options
      • D3D11FeatureDataD3D9Options1
      • D3D11FeatureDataD3D9ShadowSupport
      • D3D11FeatureDataD3D9SimpleInstancingSupport
      • D3D11FeatureDataDoubles
      • D3D11FeatureDataFormatSupport
      • D3D11FeatureDataFormatSupport2
      • D3D11FeatureDataMarkerSupport
      • D3D11FeatureDataShaderMinPrecisionSupport
      • D3D11FeatureDataThreading
      • D3D11FeatureLevel
      • D3D11FillMode
      • D3D11Filter
      • D3D11FormatSupport
      • D3D11FormatSupport2
      • D3D11GeometryShader
      • D3D11HullShader
      • D3D11InputClassification
      • D3D11InputElementDesc
      • D3D11InputLayout
      • D3D11MapCpuPermission
      • D3D11MapOptions
      • D3D11MappedSubResource
      • D3D11PixelShader
      • D3D11Predicate
      • D3D11Primitive
      • D3D11PrimitiveTopology
      • D3D11Query
      • D3D11QueryDataPipelineStatistics
      • D3D11QueryDataStreamOutputStatistics
      • D3D11QueryDataTimestampDisjoint
      • D3D11QueryDesc
      • D3D11QueryMiscOptions
      • D3D11QueryType
      • D3D11RaiseOptions
      • D3D11RasterizerDesc
      • D3D11RasterizerState
      • D3D11Rect
      • D3D11RenderTargetBlendDesc
      • D3D11RenderTargetView
      • D3D11RenderTargetViewDesc
      • D3D11Resource
      • D3D11ResourceDimension
      • D3D11ResourceMiscOptions
      • D3D11RtvDimension
      • D3D11SamplerDesc
      • D3D11SamplerState
      • D3D11ShaderMinPrecisionSupports
      • D3D11ShaderResourceView
      • D3D11ShaderResourceViewDesc
      • D3D11SrvDimension
      • D3D11StencilOperation
      • D3D11StreamOutputDeclarationEntry
      • D3D11SubResourceData
      • D3D11Texture1D
      • D3D11Texture1DArrayDsv
      • D3D11Texture1DArrayRtv
      • D3D11Texture1DArraySrv
      • D3D11Texture1DArrayUav
      • D3D11Texture1DDesc
      • D3D11Texture1DDsv
      • D3D11Texture1DRtv
      • D3D11Texture1DSrv
      • D3D11Texture1DUav
      • D3D11Texture2D
      • D3D11Texture2DArrayDsv
      • D3D11Texture2DArrayRtv
      • D3D11Texture2DArraySrv
      • D3D11Texture2DArrayUav
      • D3D11Texture2DDesc
      • D3D11Texture2DDsv
      • D3D11Texture2DMsArrayDsv
      • D3D11Texture2DMsArrayRtv
      • D3D11Texture2DMsArraySrv
      • D3D11Texture2DMsDsv
      • D3D11Texture2DMsRtv
      • D3D11Texture2DMsSrv
      • D3D11Texture2DRtv
      • D3D11Texture2DSrv
      • D3D11Texture2DUav
      • D3D11Texture3D
      • D3D11Texture3DDesc
      • D3D11Texture3DRtv
      • D3D11Texture3DSrv
      • D3D11Texture3DUav
      • D3D11TextureAddressMode
      • D3D11TextureCubeArraySrv
      • D3D11TextureCubeFace
      • D3D11TextureCubeSrv
      • D3D11TiledResourcesTier
      • D3D11UavDimension
      • D3D11UnorderedAccessView
      • D3D11UnorderedAccessViewDesc
      • D3D11Usage
      • D3D11Utils
      • D3D11VertexShader
      • D3D11View
      • D3D11Viewport
      • D3D11WellKnownPrivateDataId
      • DxgiSwapChainExtensions
      • ID3D11Releasable
    • JeremyAnsel.DirectX.D3DCompiler
      • D3DCompile
      • D3DCompileOptions
      • D3DDisassembleOptions
      • D3DShaderMacro
      • D3DTargets
    • JeremyAnsel.DirectX.DWrite
      • DWriteBreakCondition
      • DWriteClusterMetrics
      • DWriteError
      • DWriteFactory
      • DWriteFactoryType
      • DWriteFlowDirection
      • DWriteFont
      • DWriteFontCollection
      • DWriteFontFace
      • DWriteFontFaceType
      • DWriteFontFamily
      • DWriteFontFeature
      • DWriteFontFeatureTag
      • DWriteFontFile
      • DWriteFontFileType
      • DWriteFontList
      • DWriteFontMetrics
      • DWriteFontSimulations
      • DWriteFontStretch
      • DWriteFontStyle
      • DWriteFontWeight
      • DWriteGlyphMetrics
      • DWriteGlyphOffset
      • DWriteGlyphRun
      • DWriteGlyphRunDescription
      • DWriteHitTestMetrics
      • DWriteInformationalStringId
      • DWriteInlineObjectMetrics
      • DWriteLineBreakpoint
      • DWriteLineMetrics
      • DWriteLineSpacingMethod
      • DWriteLocalizedStrings
      • DWriteMatrix
      • DWriteMeasuringMode
      • DWriteNumberSubstitutionMethod
      • DWriteOverhangMetrics
      • DWriteParagraphAlignment
      • DWritePixelGeometry
      • DWriteReadingDirection
      • DWriteRect
      • DWriteRenderingMode
      • DWriteRenderingParams
      • DWriteScriptAnalysis
      • DWriteScriptShape
      • DWriteShapingGlyphProperties
      • DWriteShapingTextProperties
      • DWriteSize
      • DWriteStrikethrough
      • DWriteTextAlignment
      • DWriteTextFormat
      • DWriteTextLayout
      • DWriteTextMetrics
      • DWriteTextRange
      • DWriteTextureType
      • DWriteTrimming
      • DWriteTrimmingGranularity
      • DWriteTypography
      • DWriteUnderline
      • DWriteUtils
      • DWriteWordWrapping
      • IDWriteReleasable
    • JeremyAnsel.DirectX.DXMath
      • XMColor
      • XMComparisonRecord
      • XMFloat2
      • XMFloat3
      • XMFloat3X3
      • XMFloat4
      • XMFloat4X3
      • XMFloat4X4
      • XMInt2
      • XMInt3
      • XMInt4
      • XMKnownColor
      • XMMath
      • XMMatrix
      • XMPermutation
      • XMPlane
      • XMQuaternion
      • XMScalar
      • XMSelection
      • XMSwizzle
      • XMUInt2
      • XMUInt3
      • XMUInt4
      • XMVector
      • XMVector2
      • XMVector3
      • XMVector4
    • JeremyAnsel.DirectX.DXMath.Collision
      • BoundingBox
      • BoundingFrustum
      • BoundingOrientedBox
      • BoundingSphere
      • ContainmentType
      • PlaneIntersectionType
      • TriangleTest
    • JeremyAnsel.DirectX.DXMath.PackedVector
      • Half
      • XMByte2
      • XMByte4
      • XMByteN2
      • XMByteN4
      • XMColorRgba
      • XMDec4
      • XMDecN4
      • XMFloat3Packed
      • XMFloat3SharedExponent
      • XMHalf2
      • XMHalf4
      • XMShort2
      • XMShort4
      • XMShortN2
      • XMShortN4
      • XMU555
      • XMU565
      • XMUByte2
      • XMUByte4
      • XMUByteN2
      • XMUByteN4
      • XMUDec4
      • XMUDecN4
      • XMUDecN4XR
      • XMUNibble4
      • XMUShort2
      • XMUShort4
      • XMUShortN2
      • XMUShortN4
      • XMXDec4
      • XMXDecN4
    • JeremyAnsel.DirectX.Dxgi
      • DxgiAdapter
      • DxgiAdapter1
      • DxgiAdapter2
      • DxgiAdapter3
      • DxgiAdapterDesc
      • DxgiAdapterDesc1
      • DxgiAdapterDesc2
      • DxgiAdapterType
      • DxgiAlphaMode
      • DxgiColorRgb
      • DxgiColorRgba
      • DxgiComputePreemptionGranularity
      • DxgiCpuAccess
      • DxgiCreateFactoryOptions
      • DxgiDevice
      • DxgiDevice1
      • DxgiDevice2
      • DxgiDevice3
      • DxgiDeviceSubObject
      • DxgiEnumModes
      • DxgiError
      • DxgiFactory
      • DxgiFactory1
      • DxgiFactory2
      • DxgiFactory3
      • DxgiFormat
      • DxgiFrameStatistics
      • DxgiGammaControl
      • DxgiGammaControlCapabilities
      • DxgiGraphicsPreemptionGranularity
      • DxgiKeyedMutex
      • DxgiMapOptions
      • DxgiMappedRect
      • DxgiMatrix3x2F
      • DxgiModeDesc
      • DxgiModeDesc1
      • DxgiModeRotation
      • DxgiModeScaling
      • DxgiModeScanlineOrder
      • DxgiObject
      • DxgiOfferResourcePriority
      • DxgiOutput
      • DxgiOutput1
      • DxgiOutput2
      • DxgiOutput3
      • DxgiOutputDesc
      • DxgiPoint
      • DxgiPresentOptions
      • DxgiRational
      • DxgiRect
      • DxgiResidency
      • DxgiResource
      • DxgiResource1
      • DxgiResource2
      • DxgiResource3
      • DxgiResourceEvictionPriority
      • DxgiSampleDesc
      • DxgiScaling
      • DxgiSharedResource
      • DxgiSharedResourceAccess
      • DxgiSurface
      • DxgiSurface1
      • DxgiSurface2
      • DxgiSurface3
      • DxgiSurfaceDesc
      • DxgiSwapChain
      • DxgiSwapChain1
      • DxgiSwapChain2
      • DxgiSwapChain3
      • DxgiSwapChainDesc
      • DxgiSwapChainDesc1
      • DxgiSwapChainFullscreenDesc
      • DxgiSwapChainOptions
      • DxgiSwapEffect
      • DxgiUsages
      • DxgiUtils
      • DxgiWindowAssociationOptions
      • IDxgiReleasable

    Class XMColor

    The color functions provided by DirectXMath.

    Inheritance
    object
    XMColor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: JeremyAnsel.DirectX.DXMath
    Assembly: JeremyAnsel.DirectX.DXMath.dll
    Syntax
    public static class XMColor

    Methods

    | Edit this page View Source

    AdjustContrast(XMVector, float)

    Adjusts the contrast value of a color.

    Declaration
    public static XMVector AdjustContrast(XMVector color, float contrast)
    Parameters
    Type Name Description
    XMVector color

    The color. Each of the components of C should be in the range 0.0f to 1.0f.

    float contrast

    Contrast value. This parameter linearly interpolates between 50 percent gray and the color C. If this parameter is 0.0f, the returned color is 50 percent gray. If this parameter is 1.0f, the returned color is the original color.

    Returns
    Type Description
    XMVector

    The color resulting from the contrast adjustment.

    | Edit this page View Source

    AdjustSaturation(XMVector, float)

    Adjusts the saturation value of a color.

    Declaration
    public static XMVector AdjustSaturation(XMVector color, float saturation)
    Parameters
    Type Name Description
    XMVector color

    The color. Each of the components of C should be in the range 0.0f to 1.0f.

    float saturation

    Saturation value. This parameter linearly interpolates between the color converted to gray-scale and the original color, C. If Saturation is 0.0f, the function returns the gray-scale color. If Saturation is 1.0f, the function returns the original color.

    Returns
    Type Description
    XMVector

    The color resulting from the saturation adjustment.

    | Edit this page View Source

    Equal(XMVector, XMVector)

    Tests for the equality of two colors.

    Declaration
    public static bool Equal(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color to compare.

    XMVector c2

    The second color to compare.

    Returns
    Type Description
    bool

    Returns true if each of the components of the two colors are equal, or false otherwise.

    | Edit this page View Source

    Greater(XMVector, XMVector)

    Tests whether all the components of the first color are greater than the corresponding components in the second color.

    Declaration
    public static bool Greater(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color to compare.

    XMVector c2

    The second color to compare.

    Returns
    Type Description
    bool

    Returns true if every component of C1 is greater than the corresponding component in C2. Returns false otherwise.

    | Edit this page View Source

    GreaterOrEqual(XMVector, XMVector)

    Tests whether all the components of the first color are greater than or equal to the corresponding components of the second color.

    Declaration
    public static bool GreaterOrEqual(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color to compare.

    XMVector c2

    The second color to compare.

    Returns
    Type Description
    bool

    Returns true if every component of C1 is greater than or equal to the corresponding component in C2. Returns false otherwise.

    | Edit this page View Source

    HslToRgb(XMVector)

    Converts HSL color values to RGB color values.

    Declaration
    public static XMVector HslToRgb(XMVector hsl)
    Parameters
    Type Name Description
    XMVector hsl

    Color value to convert. The X element is Hue (H), the Y element is Saturation (S), the Z element is Luminance (L), and the W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of hsl.w) . Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    HsvToRgb(XMVector)

    Converts HSV color values to RGB color values.

    Declaration
    public static XMVector HsvToRgb(XMVector hsv)
    Parameters
    Type Name Description
    XMVector hsv

    Color value to convert. The X element is Hue (H), the Y element is Saturation (S), the Z element is Value (V), and the W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of hsv.w) . Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    IsInfinite(XMVector)

    Tests to see whether any of the components of a color are either positive or negative infinity.

    Declaration
    public static bool IsInfinite(XMVector c)
    Parameters
    Type Name Description
    XMVector c

    The color.

    Returns
    Type Description
    bool

    Returns true if any components of C are either positive or negative infinity. Returns false otherwise.

    | Edit this page View Source

    IsNaN(XMVector)

    Tests to see whether any component of a color is not a number (NaN).

    Declaration
    public static bool IsNaN(XMVector c)
    Parameters
    Type Name Description
    XMVector c

    The color.

    Returns
    Type Description
    bool

    Returns true if any components of C are NaN, or false otherwise.

    | Edit this page View Source

    Less(XMVector, XMVector)

    Tests whether all the components of the first color are less than the corresponding components of the second color.

    Declaration
    public static bool Less(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color to compare.

    XMVector c2

    The second color to compare.

    Returns
    Type Description
    bool

    Returns true if every component of C1 is less than the corresponding component in C2. Returns false otherwise.

    | Edit this page View Source

    LessOrEqual(XMVector, XMVector)

    Tests whether all the components of the first color are less than or equal to the corresponding components of the second color.

    Declaration
    public static bool LessOrEqual(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color to compare.

    XMVector c2

    The second color to compare.

    Returns
    Type Description
    bool

    Returns true if every component of C1 is less than or equal to the corresponding component in C2. Returns false otherwise.

    | Edit this page View Source

    Modulate(XMVector, XMVector)

    Blends two colors by multiplying corresponding components together.

    Declaration
    public static XMVector Modulate(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color.

    XMVector c2

    The second color.

    Returns
    Type Description
    XMVector

    The color resulting from the modulation.

    | Edit this page View Source

    Negative(XMVector)

    Determines the negative RGB color value of a color.

    Declaration
    public static XMVector Negative(XMVector c)
    Parameters
    Type Name Description
    XMVector c

    The color. Each of the components of C should be in the range 0.0f to 1.0f.

    Returns
    Type Description
    XMVector

    The negative color. The w-component (alpha) is copied unmodified from the input vector.

    | Edit this page View Source

    NotEqual(XMVector, XMVector)

    Tests to see whether two colors are unequal.

    Declaration
    public static bool NotEqual(XMVector c1, XMVector c2)
    Parameters
    Type Name Description
    XMVector c1

    The first color to compare.

    XMVector c2

    The second color to compare.

    Returns
    Type Description
    bool

    Returns true if any component of C1 is different from the corresponding component of C2. Returns false otherwise.

    | Edit this page View Source

    RgbToHsl(XMVector)

    Converts RGB color values to HSL color values.

    Declaration
    public static XMVector RgbToHsl(XMVector rgb)
    Parameters
    Type Name Description
    XMVector rgb

    Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value. The X element is Hue (H), the Y element is Saturation (S), the Z element is Luminance (L), and the W element is Alpha (a copy of the input's Alpha value). Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    RgbToHsv(XMVector)

    Converts RGB color values to HSV color values.

    Declaration
    public static XMVector RgbToHsv(XMVector rgb)
    Parameters
    Type Name Description
    XMVector rgb

    Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value. The X element is Hue (H), the Y element is Saturation (S), the Z element is Value (V), and the W element is Alpha (a copy of rgb.w). Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    RgbToSrgb(XMVector)

    Converts an RGB color vector to sRGB.

    Declaration
    public static XMVector RgbToSrgb(XMVector rgb)
    Parameters
    Type Name Description
    XMVector rgb

    The original RGB color vector.

    Returns
    Type Description
    XMVector

    The converted sRGBA color vector. The x element is red, the y element is green, the z element is blue, and the w element is the alpha value (which is a copy of rgb.w). Each element value has a range of 0.0 to 1.0 in the sRGB colorspace.

    | Edit this page View Source

    RgbToXyz(XMVector)

    Converts RGB color values to XYZ color values.

    Declaration
    public static XMVector RgbToXyz(XMVector rgb)
    Parameters
    Type Name Description
    XMVector rgb

    Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value with the trisimulus values of X, Y, and Z in the corresponding element, and the W element with Alpha (a copy of rgb.w). Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    RgbToYuv(XMVector)

    Converts RGB color values to YUV color values.

    Declaration
    public static XMVector RgbToYuv(XMVector rgb)
    Parameters
    Type Name Description
    XMVector rgb

    Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value in Luma-Chrominance (YUV) aka YCbCr. The X element contains Luma (Y, 0.0 to 1.0), the Y element contains Blue-difference chroma (-0.5 to 0.5), the Z element contains the Red-difference chroma (-0.5 to 0.5), and the W element contains the Alpha (a copy of rgb.w).

    | Edit this page View Source

    RgbToYuvHD(XMVector)

    Converts RGB color values to YUV HD color values.

    Declaration
    public static XMVector RgbToYuvHD(XMVector rgb)
    Parameters
    Type Name Description
    XMVector rgb

    Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value in Luma-Chrominance (YUV) aka YCbCr. The X element contains Luma (Y, 0.0 to 1.0), the Y element contains Blue-difference chroma (-0.5 to 0.5), the Z element contains the Red-difference chroma (-0.5 to 0.5), and the W element contains the Alpha (a copy of rgb.w).

    | Edit this page View Source

    SrgbToRgb(XMVector)

    Converts an sRGB color vector to RGB.

    Declaration
    public static XMVector SrgbToRgb(XMVector srgb)
    Parameters
    Type Name Description
    XMVector srgb

    An sRGB color vector.

    Returns
    Type Description
    XMVector

    The converted RGBA color vector. The x element is red, the y element is green, the z element is blue, and the w element is the alpha value (which is a copy of srgb.w). Each element value has a range of 0.0 to 1.0 in the RGB colorspace.

    | Edit this page View Source

    SrgbToXyz(XMVector)

    Converts SRGB color values to XYZ color values.

    Declaration
    public static XMVector SrgbToXyz(XMVector srgb)
    Parameters
    Type Name Description
    XMVector srgb

    Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0 and is in the linear sRGB colorspace.

    Returns
    Type Description
    XMVector

    The converted color value with the trisimulus values of X, Y, and Z in the corresponding element, and the W element with Alpha (a copy of rgb.w). Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    XyzToRgb(XMVector)

    Converts XYZ color values to RGB color values.

    Declaration
    public static XMVector XyzToRgb(XMVector xyz)
    Parameters
    Type Name Description
    XMVector xyz

    Color value to convert with the trisimulus values of X, Y, and Z in the corresponding element, and the W element with Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of xyz.w). Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    XyzToSrgb(XMVector)

    Converts XYZ color values to SRGB color values.

    Declaration
    public static XMVector XyzToSrgb(XMVector xyz)
    Parameters
    Type Name Description
    XMVector xyz

    Color value to convert with the trisimulus values of X, Y, and Z in the corresponding element, and the W element with Alpha. Each has a range of 0.0 to 1.0.

    Returns
    Type Description
    XMVector

    The converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of xyz.w). Each has a range of 0.0 to 1.0 in the linear sRGB colorspace.

    | Edit this page View Source

    YuvToRgb(XMVector)

    Converts YUV color values to RGB color values.

    Declaration
    public static XMVector YuvToRgb(XMVector yuv)
    Parameters
    Type Name Description
    XMVector yuv

    Color value to convert in Luma-Chrominance (YUV) aka YCbCr. The X element contains Luma (Y, 0.0 to 1.0), the Y element contains Blue-difference chroma (U, -0.5 to 0.5), the Z element contains the Red-difference chroma (V, -0.5 to 0.5), and the W element contains the Alpha (0.0 to 1.0).

    Returns
    Type Description
    XMVector

    The converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of yuv.w). Each has a range of 0.0 to 1.0.

    | Edit this page View Source

    YuvToRgbHD(XMVector)

    Converts YUV color values to RGB HD color values.

    Declaration
    public static XMVector YuvToRgbHD(XMVector yuv)
    Parameters
    Type Name Description
    XMVector yuv

    Color value to convert in Luma-Chrominance (YUV) aka YCbCr. The X element contains Luma (Y, 0.0 to 1.0), the Y element contains Blue-difference chroma (U, -0.5 to 0.5), the Z element contains the Red-difference chroma (V, -0.5 to 0.5), and the W element contains the Alpha (0.0 to 1.0).

    Returns
    Type Description
    XMVector

    The converted color value. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha (a copy of yuv.w). Each has a range of 0.0 to 1.0.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2014-2022 Jérémy Ansel