TemperatureCache class

Design utilities using color temperature theory.

Analogous colors, complementary color, and cache to efficiently, lazily, generate data for calculations when needed.

Constructors

TemperatureCache(Hct input)

Properties

coldest Hct
read-only
complement Hct
A color that complements the input color aesthetically.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
hctsByHue List<Hct>
HCTs for all hues, with the same chroma/tone as the input. Sorted ascending, hue 0 to 360.
read-only
hctsByTemp List<Hct>
HCTs for all hues, with the same chroma/tone as the input. Sorted from coldest first to warmest last.
read-only
input Hct
final
inputRelativeTemperature double
Relative temperature of the input color. See relativeTemperature.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
tempsByHct Map<Hct, double>
A Map with keys of HCTs in hctsByTemp, values of raw temperature.
read-only
warmest Hct
read-only

Methods

analogous({int count = 5, int divisions = 12}) List<Hct>
A set of colors with differing hues, equidistant in temperature.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
relativeTemperature(Hct hct) double
Temperature relative to all colors with the same chroma and tone. Value on a scale from 0 to 1.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

isBetween({required double angle, required double a, required double b}) bool
Determines if an angle is between two other angles, rotating clockwise.
rawTemperature(Hct color) double
Value representing cool-warm factor of a color. Values below 0 are considered cool, above, warm.