Struct YccK
- Namespace
- SixLabors.ImageSharp.ColorProfiles
- Assembly
- SixLabors.ImageSharp.dll
Represents a YCCK (luminance, blue chroma, red chroma, black) color. YCCK is not a true color space but a reversible transform of CMYK, where the CMY components are converted to YCbCr using the ITU-R BT.601 standard, and the K (black) component is preserved separately.
public readonly struct YccK : IColorProfile<YccK, Rgb>, IColorProfile<YccK>, IColorProfile, IEquatable<YccK>
- Implements
- Inherited Members
Constructors
YccK(Vector4)
Initializes a new instance of the YccK struct.
public YccK(Vector4 vector)
Parameters
vectorVector4The vector representing the c, m, y, k components.
YccK(float, float, float, float)
Initializes a new instance of the YccK struct.
public YccK(float y, float cb, float cr, float k)
Parameters
yfloatThe y luminance component.
cbfloatThe cb chroma component.
crfloatThe cr chroma component.
kfloatThe keyline black component.
Properties
Cb
Gets the C (blue) chroma component.
public float Cb { get; }
Property Value
Cr
Gets the C (red) chroma component.
public float Cr { get; }
Property Value
K
Gets the keyline black color component.
public float K { get; }
Property Value
Y
Gets the Y luminance component.
public float Y { get; }
Property Value
Methods
Equals(YccK)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(YccK other)
Parameters
otherYccKAn 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 Rgb)
Initializes the color instance from the profile connection space.
public static YccK FromProfileConnectingSpace(ColorConversionOptions options, in Rgb source)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
sourceRgbThe color profile connecting space.
Returns
FromProfileConnectionSpace(ColorConversionOptions, ReadOnlySpan<Rgb>, Span<YccK>)
Converts the span of colors from the profile connection space.
public static void FromProfileConnectionSpace(ColorConversionOptions options, ReadOnlySpan<Rgb> source, Span<YccK> destination)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
sourceReadOnlySpan<Rgb>The color profile span to convert from.
destinationSpan<YccK>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 YccK FromScaledVector4(Vector4 source)
Parameters
sourceVector4The vector to load the pixel from.
Returns
FromScaledVector4(ReadOnlySpan<Vector4>, Span<YccK>)
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<YccK> destination)
Parameters
sourceReadOnlySpan<Vector4>The vector span to convert from.
destinationSpan<YccK>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 Rgb ToProfileConnectingSpace(ColorConversionOptions options)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
Returns
ToProfileConnectionSpace(ColorConversionOptions, ReadOnlySpan<YccK>, Span<Rgb>)
Converts the span of colors to the profile connection space.
public static void ToProfileConnectionSpace(ColorConversionOptions options, ReadOnlySpan<YccK> source, Span<Rgb> destination)
Parameters
optionsColorConversionOptionsThe color profile conversion options.
sourceReadOnlySpan<YccK>The color span to convert from.
destinationSpan<Rgb>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<YccK>, Span<Vector4>)
Converts the span of colors to a generic ("scaled") Vector4 representation
with values scaled and clamped between
public static void ToScaledVector4(ReadOnlySpan<YccK> source, Span<Vector4> destination)
Parameters
sourceReadOnlySpan<YccK>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 ==(YccK, YccK)
Compares two YccK objects for equality.
public static bool operator ==(YccK left, YccK right)
Parameters
leftYccKThe YccK on the left side of the operand.
rightYccKThe YccK on the right side of the operand.
Returns
- bool
True if the current left is equal to the
rightparameter; otherwise, false.
operator !=(YccK, YccK)
Compares two YccK objects for inequality.
public static bool operator !=(YccK left, YccK right)
Parameters
leftYccKThe YccK on the left side of the operand.
rightYccKThe YccK on the right side of the operand.
Returns
- bool
True if the current left is unequal to the
rightparameter; otherwise, false.