Hct class
HCT, hue, chroma, and tone. A color system that provides a perceptually accurate color measurement system that can also accurately render what colors will appear as in different lighting environments.
- Available extensions
Constructors
- Hct.fromColor(Color color, {ColorModel model = ColorModel.kDefault})
-
factory
Properties
- chroma → double
-
no setter
- color → Color
-
no setter
- colorModel → ColorModel
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hue → double
-
A number, in degrees, representing ex. red, orange, yellow, etc.
Ranges from 0 <= hue < 360
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tone → double
-
Lightness. Ranges from 0 to 100.
no setter
- uvChroma → double
-
Available on Hct, provided by the HctUvCoordinates extension
Distance of this color's chromaticity from the white point in u'v' (0 = achromatic; sRGB colors reach ~0.28 at vivid red).no setter - uvHue → double
-
Available on Hct, provided by the HctUvCoordinates extension
Direction of this color's chromaticity from the white point, in degrees [0, 360). 0 for achromatic colors.no setter
Methods
-
inViewingConditions(
Cam16ViewingConditions vc) → Hct -
Translate a color into different
ViewingConditions. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toInt(
) → int -
toString(
) → String -
A string representation of this object.
override
-
withChroma(
double newChroma) → Hct -
Returns a copy of this color with chroma replaced by
newChroma. -
withHue(
double newHue) → Hct -
Returns a copy of this color with hue replaced by
newHue. -
withTone(
double newTone) → Hct -
Returns a copy of this color with tone replaced by
newTone.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
colorFrom(
double hue, double chroma, double tone, {ColorModel model = ColorModel.kDefault}) → Color -
from(
double hue, double chroma, double tone, {ColorModel model = ColorModel.kDefault}) → Hct -
0 <=
hue< 360; invalid values are corrected. 0 <=chroma<= ?; Informally, colorfulness. The color returned may be lower than the requested chroma. Chroma has a different maximum for any given hue and tone. 0 <=tone<= 100; informally, lightness. Invalid values are corrected. -
fromInt(
int argb, {ColorModel model = ColorModel.kDefault}) → Hct -
HCT representation of
argb. -
lerpKeepHue(
Color colorA, Color colorB, double t, {ColorModel model = ColorModel.kDefault}) → Color -
lerpLoseHueAndChroma(
Color colorA, Color colorB, double t, {ColorModel model = ColorModel.kDefault}) → Color - Linearly interpolates between two colors in HCT space, allowing both hue and chroma to shift as needed.