SpectrumUtils extension Null safety

Spectrum-branded Color extension methods and getters, namely for the generation of complementary colors.

on

Properties

asMaterialAccent MaterialAccentColor
Returns this color as a MaterialAccentColor via materialAccentFrom using SwatchMode.shade and a factor of 200.
read-only
asMaterialColor MaterialColor
Returns this color as a MaterialColor via materialPrimaryFrom using SwatchMode.shade and a factor of 200.
read-only
complementPair List<Color>
Returns a two-entry List<Color> containing this and the inverse of this, resembling: [...]
read-only
complementTriad List<Color>
Returns a three-entry List<Color> containing this and two versions of this with its components shifted, resembling: [...]
read-only

Methods

blend(Color other, [double blend = 0.5]) Color
A shortcut for Color.lerp. [...]
complementary(int count, [double? distance]) List<Color>
The number of Colors returned in this List will match count, and the original color this will be first amongst them.