SpectrumUtils extension
Spectrum-branded Color extension methods and getters, namely for the generation of complementary colors.
- on
Properties
- asMaterialAccent → MaterialAccentColor
-
Returns
this
color as a MaterialAccentColor viamaterialAccentFrom
using SwatchMode.shade and afactor
of200
.no setter - asMaterialColor → MaterialColor
-
Returns
this
color as a MaterialColor viamaterialPrimaryFrom
using SwatchMode.shade and afactor
of200
.no setter -
complementPair
→ List<
Color> -
Returns a two-entry
List<Color>
containingthis
and the inverse ofthis
, resembling:no setter -
complementTriad
→ List<
Color> -
Returns a three-entry
List<Color>
containingthis
and two versions ofthis
with its components shifted, resembling:no setter
Methods
-
blend(
Color other, [double blend = 0.5]) → Color - A shortcut for Color.lerp.
-
complementary(
int count, [double? distance]) → List< Color> -
The number of
Color
s returned in thisList
will matchcount
, and the original colorthis
will be first amongst them.