nameThatColor static method
Returns a String name of the color passed to it.
The nameThatColor
function uses a list of 1566 color codes and their
names. It finds the color that closest matches the given color in the list
and returns its color name.
Use this function to name used and selected colors in e.g. a color picker or name random colors or colors given as input by users.
The returned color name is based on a Dart port of a JavaScript tool called 'ntc', short for "Name That Color". The javascript project and info about it can be found here http://chir.ag/projects/ntc.
Implementation
static String nameThatColor(Color color) =>
_ColorName.fromColor(color).getName;