color property
dynamic
get
color
Follow this method with any standard CSS/SVG/X11 color name (remove spaces from name)
The case/capitalizatiom of the color name is not important.
color returns chalk as 'dynamic' so that CSS/SVG/X11 color names can 'dynamically' be
accessed as virtual methods.
ie. chalk.color.cornflowerblue('works like this')
(this is the equivalent of chalk.keyword('cornflowerblue')('same things using keyword()'
)
Implementation
dynamic get color {
var chalk = _createStyler('', '', this);
chalk._hasStyle = false;
return chalk;
}