Struct CieLuv
- Namespace
- SixLabors.ImageSharp.ColorProfiles
- Assembly
- SixLabors.ImageSharp.dll
The CIE 1976 (L*, u*, v*) color space, commonly known by its abbreviation CIELUV, is a color space adopted by the International Commission on Illumination (CIE) in 1976, as a simple-to-compute transformation of the 1931 CIE XYZ color space, but which attempted perceptual uniformity https://en.wikipedia.org/wiki/CIELUV
public readonly struct CieLuv : IColorProfile<CieLuv, CieXyz>, IColorProfile<CieLuv>, IColorProfile, IEquatable<CieLuv>
- Implements
- Inherited Members
Constructors
CieLuv(Vector3)
Initializes a new instance of the CieLuv struct.
public CieLuv(Vector3 vector)
Parameters
vectorVector3The vector representing the l, u, v components.
CieLuv(float, float, float)
Initializes a new instance of the CieLuv struct.
public CieLuv(float l, float u, float v)
Parameters
lfloatThe lightness dimension.
ufloatThe blue-yellow chromaticity coordinate of the given white point.
vfloatThe red-green chromaticity coordinate of the given white point.
Properties
L
Gets the lightness dimension
public float L { get; }
Property Value
U
Gets the blue-yellow chromaticity coordinate of the given white point.
public float U { get; }
Property Value
V
Gets the red-green chromaticity coordinate of the given white point.
public float V { get; }
Property Value
Methods
Equals(CieLuv)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CieLuv other)
Parameters
otherCieLuvAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
FromProfileConnectingSpace(ColorConversionOptions, in CieXyz)
Initializes the color instance from the profile connection space.
public static CieLuv FromProfileConnectingSpace(ColorConversionOptions options, in CieXyz source)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
sourceCieXyzThe color profile connecting space.
Returns
FromProfileConnectionSpace(ColorConversionOptions, ReadOnlySpan<CieXyz>, Span<CieLuv>)
Converts the span of colors from the profile connection space.
public static void FromProfileConnectionSpace(ColorConversionOptions options, ReadOnlySpan<CieXyz> source, Span<CieLuv> destination)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
sourceReadOnlySpan<CieXyz>The color profile span to convert from.
destinationSpan<CieLuv>The color span to write the results to.
FromScaledVector4(Vector4)
Initializes the color instance from a generic a generic ("scaled") Vector4 representation
with values scaled and clamped between
public static CieLuv FromScaledVector4(Vector4 source)
Parameters
sourceVector4The vector to load the pixel from.
Returns
FromScaledVector4(ReadOnlySpan<Vector4>, Span<CieLuv>)
Converts the span of colors from a generic ("scaled") Vector4 representation
with values scaled and clamped between
public static void FromScaledVector4(ReadOnlySpan<Vector4> source, Span<CieLuv> destination)
Parameters
sourceReadOnlySpan<Vector4>The vector span to convert from.
destinationSpan<CieLuv>The color span to write the results to.
GetChromaticAdaptionWhitePointSource()
Gets the chromatic adaption white point source.
public static ChromaticAdaptionWhitePointSource GetChromaticAdaptionWhitePointSource()
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToProfileConnectingSpace(ColorConversionOptions)
Converts the color to the profile connection space.
public CieXyz ToProfileConnectingSpace(ColorConversionOptions options)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
Returns
ToProfileConnectionSpace(ColorConversionOptions, ReadOnlySpan<CieLuv>, Span<CieXyz>)
Converts the span of colors to the profile connection space.
public static void ToProfileConnectionSpace(ColorConversionOptions options, ReadOnlySpan<CieLuv> source, Span<CieXyz> destination)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
sourceReadOnlySpan<CieLuv>The color span to convert from.
destinationSpan<CieXyz>The color profile span to write the results to.
ToScaledVector4()
Expands the pixel into a generic ("scaled") Vector4 representation
with values scaled and clamped between
public Vector4 ToScaledVector4()
Returns
ToScaledVector4(ReadOnlySpan<CieLuv>, Span<Vector4>)
Converts the span of colors to a generic ("scaled") Vector4 representation
with values scaled and clamped between
public static void ToScaledVector4(ReadOnlySpan<CieLuv> source, Span<Vector4> destination)
Parameters
sourceReadOnlySpan<CieLuv>The color span to convert from.
destinationSpan<Vector4>The vector span to write the results to.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(CieLuv, CieLuv)
Compares two CieLuv objects for equality.
public static bool operator ==(CieLuv left, CieLuv right)
Parameters
leftCieLuvThe CieLuv on the left side of the operand.
rightCieLuvThe CieLuv on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(CieLuv, CieLuv)
Compares two CieLuv objects for inequality.
public static bool operator !=(CieLuv left, CieLuv right)
Parameters
leftCieLuvThe CieLuv on the left side of the operand.
rightCieLuvThe CieLuv on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.