From e23e9e80f78e9578edfcd005d6b1fde09e873b3a Mon Sep 17 00:00:00 2001 From: Josh Junon Date: Tue, 17 Jan 2017 03:59:05 -0800 Subject: [PATCH] add examples to 256/truecolor section --- readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/readme.md b/readme.md index cc43d89..2bcbff8 100644 --- a/readme.md +++ b/readme.md @@ -196,8 +196,19 @@ Chalk supports 256 colors and, when manually specified, [Truecolor (16 million c For the methods that support it (listed below), the color will be 'fit' to the color level supported (i.e. RGB colors will be downsampled to 16 colors if only basic support is enabled). +Some examples: + For a complete list of color models, see [`color-convert`'s list of conversions](https://github.com/Qix-/color-convert/blob/master/conversions.js). Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors). +- `chalk.hex('#DEADED').underline('Hello, world!')` +- `chalk.keyword('orange')('Some orange text')` +- `chalk.rgb(15, 100, 204).inverse('Hello!')` + + +- `chalk.bgHex('#DEADED').underline('Hello, world!')` +- `chalk.bgKeyword('orange')('Some orange text')` +- `chalk.bgRgb(15, 100, 204).inverse('Hello!')` + As of this writing, these are the supported color models that are exposed in Chalk: - `rgb`