keyword method

Chalk keyword(
  1. String colorKeyword
)

Returns a Chalk with the foreground color set to the color represented by the passed in color keyword. This accepts all of the standard X11/CSS/SVG color names, and the user can extend the list of accepted color keywords using the addColorKeywordRgb() and addColorKeywordHex() methods

Implementation

Chalk keyword(String colorKeyword) {
  var rgb = ColorUtils.rgbFromKeyword(colorKeyword);
  return makeRGBChalk(rgb[0], rgb[1], rgb[2]);
}