Table of Contents

Struct YCbCr

Namespace
SixLabors.ImageSharp.ColorSpaces
Assembly
SixLabors.ImageSharp.dll

Represents an YCbCr (luminance, blue chroma, red chroma) color as defined in the ITU-T T.871 specification for the JFIF use with Jpeg. http://en.wikipedia.org/wiki/YCbCr http://www.ijg.org/files/T-REC-T.871-201105-I!!PDF-E.pdf

public readonly struct YCbCr : IEquatable<YCbCr>
Implements
Inherited Members

Constructors

YCbCr(Vector3)

Initializes a new instance of the YCbCr struct.

public YCbCr(Vector3 vector)

Parameters

vector Vector3

The vector representing the y, cb, cr components.

YCbCr(float, float, float)

Initializes a new instance of the YCbCr struct.

public YCbCr(float y, float cb, float cr)

Parameters

y float

The y luminance component.

cb float

The cb chroma component.

cr float

The cr chroma component.

Properties

Cb

Gets the Cb chroma component. A value ranging between 0 and 255.

public float Cb { get; }

Property Value

float

Cr

Gets the Cr chroma component. A value ranging between 0 and 255.

public float Cr { get; }

Property Value

float

Y

Gets the Y luminance component. A value ranging between 0 and 255.

public float Y { get; }

Property Value

float

Methods

Equals(YCbCr)

public bool Equals(YCbCr other)

Parameters

other YCbCr

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(YCbCr, YCbCr)

Compares two YCbCr objects for equality.

public static bool operator ==(YCbCr left, YCbCr right)

Parameters

left YCbCr

The YCbCr on the left side of the operand.

right YCbCr

The YCbCr on the right side of the operand.

Returns

bool

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

operator !=(YCbCr, YCbCr)

Compares two YCbCr objects for inequality.

public static bool operator !=(YCbCr left, YCbCr right)

Parameters

left YCbCr

The YCbCr on the left side of the operand.

right YCbCr

The YCbCr on the right side of the operand.

Returns

bool

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