chalk_x11
library
Extensions
-
ChalkX11
on Chalk
-
This extension class adds proper methods to Chalk for all of the
standard X11/CSS/SVG color names for use by Chalk.
This extension has the added advantage of providing code completion and type
checking at coding/compile time. Using the dynamic color method cannot provide
any coding/compile time checks because it works via a dynamic lookup at run time.
Example of using this extension for Chalk:
chalk.lightGoldenrodYellow.onCornflowerBlue(...)
versus having to use the color
(or css
or x11
) method to get a dynamic
so
you can use the dynamic lookups:
chalk.color.lightGoldenrodYellow.onCornflowerBlue(...)
Because of the dynamic lookup is not resolved until run time that method can be
prone to errors which would not be detected until run time.