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:

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. [...]
read-only
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.
read / write
maximumLightness → double
The maximum lightness value for this target. Must not be null.
final
maximumSaturation → double
The maximum saturation value for this target. Must not be null.
final
minimumLightness → double
The minimum lightness value for this target. Must not be null.
final
minimumSaturation → double
The minimum saturation value for this target. Must not be null.
final
populationWeight ↔ double
The weight of importance that a color's population value has on selection.
read / write
saturationWeight ↔ double
The weight of importance that a color's saturation value has on selection.
read / write
targetLightness → double
The target lightness value for this target. Must not be null.
final
targetSaturation → double
The target saturation value for this target. Must not be null.
final
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.debug }) → String
Returns 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 ==(dynamic other) → bool
The equality operator. [...]

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