HSVColor class

A color represented using alpha, hue, saturation, and value.

An HSVColor is represented in a parameter space that's motivated by human perception. The representation is useful for some color computations (e.g., rotating the hue through the colors of the rainbow).

Annotations
  • @immutable

Constructors

HSVColor.fromAHSV(double alpha, double hue, double saturation, double value)
Creates a color. [...]
const
HSVColor.fromColor(Color color)
Creates an HSVColor from an RGB Color. [...]
factory

Properties

alpha double
Alpha, from 0.0 to 1.0.
final
hashCode int
The hash code for this object. [...]
read-only
hue double
Hue, from 0.0 to 360.0.
final
saturation double
Saturation, from 0.0 to 1.0.
final
value double
Value, from 0.0 to 1.0.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toColor() Color
Returns this color in RGB.
toString() String
Returns a string representation of this object.
withAlpha(double alpha) HSVColor
Returns a copy of this color with the alpha parameter replaced with the given value.
withHue(double hue) HSVColor
Returns a copy of this color with the hue parameter replaced with the given value.
withSaturation(double saturation) HSVColor
Returns a copy of this color with the saturation parameter replaced with the given value.
withValue(double value) HSVColor
Returns a copy of this color with the value parameter replaced with the given value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]

Static Methods

lerp(HSVColor a, HSVColor b, double t) HSVColor
Linearly interpolate between two HSVColors. [...]