Class ColorData
- Namespace
- NixUniversalSDK
- Assembly
- NixUniversalSDK.dll
Class describing colorimetry data
public class ColorData : IColorData
- Inheritance
-
ColorData
- Implements
- Inherited Members
- Extension Methods
Constructors
ColorData(double[], ReferenceWhite, ScanMode)
Constructs a ColorData instance from a CIEXYZ value
public ColorData(double[] xyz, ReferenceWhite reference, ScanMode mode = ScanMode.M2)
Parameters
xyz
double[]CIEXYZ value (Y on 0 - 1.0 scale)
reference
ReferenceWhiteReference white for this color
mode
ScanModeScan mode used for this measurement
Properties
Mode
Scan mode for this value.
public ScanMode Mode { get; }
Property Value
Reference
Reference white point for this color value.
public ReferenceWhite Reference { get; }
Property Value
RgbValue
sRGB value for this color.
public byte[] RgbValue { get; }
Property Value
- byte[]
Type
Type of color data stored in the Value field.
public ColorType Type { get; }
Property Value
Value
Color value (3 coordinates) in the format specified by Type.
public double[] Value { get; }
Property Value
- double[]
Methods
CompareTo(IColorData, ColorDifferenceType)
Calculate delta E between this color and another. The colors must share the same reference white point (Reference).
public double CompareTo(IColorData other, ColorDifferenceType type = ColorDifferenceType.CIE2000)
Parameters
other
IColorDataAnother IColorData instance
type
ColorDifferenceTypeDelta E equation type (defaults to CIE2000)
Returns
- double
Color difference (delta E) value
ConvertTo(ColorType)
Convert this color value to another ColorType.
public IColorData ConvertTo(ColorType type)
Parameters
type
ColorType