Score class Null safety

Given a large set of colors, remove colors that are unsuitable for a UI theme, and rank the rest based on suitability.

Enables use of a high cluster count for image quantization, thus ensuring colors aren't muddied, while curating the high cluster count to a much smaller number of appropriate choices.

Constructors

Score()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

argbToProportion(Map<int, int> argbToCount) Map<int, double>
score(Map<int, int> colorsToPopulation, {int desired = 4, bool filter = true}) List<int>
Given a map with keys of colors and values of how often the color appears, rank the colors based on suitability for being used for a UI theme.