ColorData

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

Class describing colorimetry data

Constructors

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

Properties

Link copied to clipboard
open val colorInt: Int

sRGB value for this color (as a ColorInt).

Link copied to clipboard
open val hexCode: String

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

Link copied to clipboard
open override val mode: ScanMode

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

Link copied to clipboard
open override val reference: ReferenceWhite

Reference white point for this color value.

Link copied to clipboard
open override val rgbValue: IntArray

sRGB value for this color.

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

Type of color data stored in the value field.

Link copied to clipboard
open override val value: DoubleArray

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

Functions

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)

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

Convert this color value to another ColorType.