# ColorData

class ColorData(@Size(value = 3) xyz: DoubleArray, val reference: ReferenceWhite, val mode: ScanMode = ScanMode.M2) : IColorData

Class describing colorimetry data

## Constructors

ColorData
Link copied to clipboard
constructor(@Size(value = 3) xyz: DoubleArray, reference: ReferenceWhite, mode: ScanMode = ScanMode.M2)

## Properties

colorInt
Link copied to clipboard
@get:ColorInt
open val colorInt: Int

sRGB value for this color (as a ColorInt).

hexCode
Link copied to clipboard
open val hexCode: String

sRGB value for this color as a HEX string (#RRGGBB)

mode
Link copied to clipboard
open override val mode: ScanMode

Scan mode for this value (one of ScanMode.M0, ScanMode.M1, or ScanMode.M2).

reference
Link copied to clipboard
open override val reference: ReferenceWhite

Reference white point for this color value.

rgbValue
Link copied to clipboard
open override val rgbValue: IntArray

sRGB value for this color.

type
Link copied to clipboard
open override val type: IColorData.ColorType

Type of color data stored in the value field.

value
Link copied to clipboard
open override val value: DoubleArray

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

## Functions

compareTo
Link copied to clipboard
open override fun compareTo(other: IColorData, type: IColorData.ColorDifferenceType): Double

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

convertTo
Link copied to clipboard
open override fun convertTo(type: IColorData.ColorType): IColorData

Convert this color value to another ColorType.