- Updated all methods on each color model that rely on their parent's equivalent method to call their super method, rather than casting back and forth between types, where applicable.
- Bug fix: The [from] constructors now copy the alpha value from the color they're being constructed from.
- Re-implemented the [toColor] method.
- Created a new base [ColorModel] class that implements [Color] that each of the models now implement. Before, this packages [ColorModel]s extended the color_models package's [ColorModel] class and implemented [Color] individually. Now, this package's [ColorModel]s can be provided as a [Color] without needing to typecast them first.
-
All color models now implement Flutter's [Color] class.
-
Normalized all [alpha] values to be on a
0
to255
scale to be in line with Flutter's [Color] class. They were on a0
to1
scale. -
Renamed [HsvColor] to [HsbColor] to avoid a naming conflict with Flutter's [Color] class's [value] parameter.
-
Renamed [interpolateTo] to [lerpTo].
-
Added the [interpolateTo] method to each color model.
-
Override the conversion methods on each color model that return their own respective color spaces. Colors were being unnecessarily converted back and forth from RGB.
- Added the global [toColor] method.
-
Added the random factory constructor to each [ColorModel].
-
The equality operator and some getters now rounds values to the millionth due to the slight loss of precision during conversions.
-
The [hue] getter now calculates hues directly from RGB, rather than doing a full conversion to HSL.
-
Added the [isMonochromatic] getter to each [ColorModel].
- Fixed a bug and corrected rounding errors in HSP to RGB conversion.
- Added the [relative] parameter to the [warmer] and [cooler] methods.
- Added the [saturation] getter to [ColorModel].
- Added the [hue] getter to [ColorModel].
- Added the [inverted] and [opposite] getters, as well as the [warmer], [cooler], [rotateHue], and [withHue] methods to each [ColorModel].
- Added support for [alpha] values and related methods to each of the [ColorModel]s.
- Updated the color_models package to version 0.2.2+3.
-
Updated the color_models package to version 0.2.2+2.
-
Added the [fromHex] static method to each of the [ColorModel]s.
-
Updated the color_models package to version 0.2.1+2.
-
Documentation and formatting changes.
- Initial release