setColorName method

Color setColorName(
  1. String style, [
  2. String colorSpace = SRGBColorSpace
])

Implementation

Color setColorName(String style, [String colorSpace = SRGBColorSpace]) {
  // color keywords
  var hex = _colorKeywords[style.toLowerCase()];

  if (hex != null) {
    // red
    setHex(hex, colorSpace);
  } else {
    // unknown color
    print('three.Color: Unknown color $style');
  }

  return this;
}