Table of Contents

Struct Chromaticity

Namespace
Egami.Colors
Assembly
Egami.dll

A CIE 1931 chromaticity: the x and y coordinates of a color with its brightness left out.

public readonly record struct Chromaticity : IEquatable<Chromaticity>
Implements
Inherited Members

Examples

// Primaries are the chromaticities of red, green, blue and white.
ColorPrimaries p3 = ColorPrimaries.DisplayP3;
Chromaticity red = p3.Red;
Console.WriteLine($"P3 red is x {red.X}, y {red.Y}; white is D65: {p3.White == Chromaticity.D65}");
ColorPrimaries custom = new(new(0.68, 0.32), new(0.265, 0.69), new(0.15, 0.06), Chromaticity.D65);

Constructors

Chromaticity(double, double)

A CIE 1931 chromaticity: the x and y coordinates of a color with its brightness left out.

public Chromaticity(double X, double Y)

Parameters

X double

The x coordinate.

Y double

The y coordinate.

Examples

// Primaries are the chromaticities of red, green, blue and white.
ColorPrimaries p3 = ColorPrimaries.DisplayP3;
Chromaticity red = p3.Red;
Console.WriteLine($"P3 red is x {red.X}, y {red.Y}; white is D65: {p3.White == Chromaticity.D65}");
ColorPrimaries custom = new(new(0.68, 0.32), new(0.265, 0.69), new(0.15, 0.06), Chromaticity.D65);

Properties

D50

Gets the CIE standard illuminant D50 (x 0.3457, y 0.3585), the white of ProPhoto RGB and of ICC's connection space.

public static Chromaticity D50 { get; }

Property Value

Chromaticity

D65

Gets the CIE standard illuminant D65 (x 0.3127, y 0.3290), the white of sRGB, Display P3 and Rec. 2020.

public static Chromaticity D65 { get; }

Property Value

Chromaticity

X

The x coordinate.

public double X { get; init; }

Property Value

double

Y

The y coordinate.

public double Y { get; init; }

Property Value

double