Cam16 class final

CAM16, a color appearance model. Colors are not just defined by their hex code, but rather, a hex code and viewing conditions.

CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16 specification, and should be used when measuring distances between colors.

In traditional color spaces, a color can be identified solely by the observer's measurement of the color. Color appearance models such as CAM16 also use information about the environment where the color was observed, known as the viewing conditions.

For example, white under the traditional assumption of a midday sun white point is accurately measured as a slightly chromatic blue by CAM16. (roughly, hue 203, chroma 3, lightness 100)

Constructors

Cam16.fromInt(int argb)
factory
Cam16.fromUcs(double jstar, double astar, double bstar)
factory
Cam16.fromUcsInViewingConditions(double jstar, double astar, double bstar, ViewingConditions viewingConditions)
factory

Properties

astar double
a* coordinate in CAM16-UCS.
final
bstar double
b* coordinate in CAM16-UCS.
final
chroma double
Chroma in CAM16.
final
hashCode int
The hash code for this object.
no setteroverride
hue double
Hue in CAM16.
final
j double
Lightness in CAM16.
final
jstar double
Lightness coordinate in CAM16-UCS.
final
m double
Colorfulness in CAM16.
final
q double
Brightness in CAM16.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
s double
Saturation in CAM16.
final

Methods

distance(Cam16 other) double
CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16 specification, and is used to measure distances between colors.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toInt() int
ARGB representation of the color. Assumes the color was viewed in default viewing conditions, which are near-identical to the default viewing conditions for sRGB.
toString() String
A string representation of this object.
override
viewed(ViewingConditions viewingConditions) int
ARGB representation of the color, in defined viewing conditions.
xyzInViewingConditions(ViewingConditions viewingConditions) List<double>

Operators

operator ==(Object other) bool
The equality operator.
override