Show / Hide Table of Contents

# Class ColorData

Class describing colorimetry data

##### Inheritance

object
ColorData

##### Implements

IColorData

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: NixUniversalSDK

###### Assembly: NixUniversalSDK.dll

##### Syntax

    public class ColorData : IColorData

### Constructors

#### ColorData(double[], ReferenceWhite, ScanMode)

Constructs a ColorData instance from a CIEXYZ value

##### Declaration

    public ColorData(double[] xyz, ReferenceWhite reference, ScanMode mode = ScanMode.M2)

##### Parameters

Type | Name | Description
--- | --- | ---
double[] | xyz | CIEXYZ value (Y on 0 - 1.0 scale)
ReferenceWhite | reference | Reference white for this color
ScanMode | mode | Scan mode used for this measurement

### Properties

#### Mode

Scan mode for this value.

##### Declaration

    public ScanMode Mode { get; }

##### Property Value

Type | Description
--- | ---
ScanMode |

#### Reference

Reference white point for this color value.

##### Declaration

    public ReferenceWhite Reference { get; }

##### Property Value

Type | Description
--- | ---
ReferenceWhite |

#### RgbValue

sRGB value for this color.

##### Declaration

    public byte[] RgbValue { get; }

##### Property Value

Type | Description
--- | ---
byte[] |

#### Type

Type of color data stored in the Value field.

##### Declaration

    public ColorType Type { get; }

##### Property Value

Type | Description
--- | ---
ColorType |

#### Value

Color value (3 coordinates) in the format specified by Type.

##### Declaration

    public double[] Value { get; }

##### Property Value

Type | Description
--- | ---
double[] |

### Methods

#### CompareTo(IColorData, ColorDifferenceType)

Calculate delta E between this color and another. The colors must share the same reference white point (Reference).

##### Declaration

    public double CompareTo(IColorData other, ColorDifferenceType type = ColorDifferenceType.CIE2000)

##### Parameters

Type | Name | Description
--- | --- | ---
IColorData | other | Another IColorData instance
ColorDifferenceType | type | Delta E equation type (defaults to CIE2000)

##### Returns

Type | Description
--- | ---
double | Color difference (delta E) value

#### ConvertTo(ColorType)

Convert this color value to another ColorType.

##### Declaration

    public IColorData ConvertTo(ColorType type)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorType | type |

##### Returns

Type | Description
--- | ---
IColorData |

### Implements

IColorData

### Extension Methods

IColorDataExtensions.HexRgbValue(IColorData)