PaletteTarget class

A class which allows custom selection of colors when a PaletteGenerator is generated.

To add a target, supply it to the targets list in PaletteGenerator.fromImage or PaletteGenerator..fromColors.

See also:

Mixed in types

Constructors

PaletteTarget({double minimumSaturation = 0.0, double targetSaturation = 0.5, double maximumSaturation = 1.0, double minimumLightness = 0.0, double targetLightness = 0.5, double maximumLightness = 1.0, bool isExclusive = true})
Creates a PaletteTarget for custom palette selection.

Properties

hashCode int
The hash code for this object.
no setteroverride
isExclusive bool
Returns whether any color selected for this target is exclusive for this target only.
final
lightnessWeight double
The weight of importance that a color's lightness value has on selection.
getter/setter pair
maximumLightness double
The maximum lightness value for this target.
final
maximumSaturation double
The maximum saturation value for this target.
final
minimumLightness double
The minimum lightness value for this target.
final
minimumSaturation double
The minimum saturation value for this target.
final
populationWeight double
The weight of importance that a color's population value has on selection.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saturationWeight double
The weight of importance that a color's saturation value has on selection.
getter/setter pair
targetLightness double
The target lightness value for this target.
final
targetSaturation double
The target saturation value for this target.
final

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Properties

baseTargets List<PaletteTarget>
A list of all the available predefined targets.
final
darkMuted PaletteTarget
A target which has the characteristics of a muted color which is dark in luminance.
final
darkVibrant PaletteTarget
A target which has the characteristics of a vibrant color which is dark in luminance.
final
lightMuted PaletteTarget
A target which has the characteristics of a muted color which is light in luminance.
final
lightVibrant PaletteTarget
A target which has the characteristics of a vibrant color which is light in luminance.
final
muted PaletteTarget
A target which has the characteristics of a muted color which is neither light or dark.
final
vibrant PaletteTarget
A target which has the characteristics of a vibrant color which is neither light or dark.
final