onKeyword method Null safety
- String colorKeyword
Returns a Chalk with the background 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 onKeyword(String colorKeyword) {
var rgb = ColorUtils.rgbFromKeyword(colorKeyword);
return makeRGBChalk(rgb[0], rgb[1], rgb[2], bg: true);
}