matchColorName static method

Map<String, Object>? matchColorName(
  1. String text
)

Match color name, case insensitive match and return the associated color entry from _EXTENDED_COLOR_NAMES list, return null if not found.

Implementation

static Map<String, Object>? matchColorName(String text) {
  var name = text.toLowerCase();
  for (var color in _EXTENDED_COLOR_NAMES) {
    if (color['name'] == name) return color;
  }
  return null;
}