You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
114
+
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
114
115
115
116
Multiple arguments will be separated by space.
116
117
117
118
### chalk.level
118
119
119
-
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all chalk consumers.
120
+
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
120
121
121
122
If you need to change this in a reusable module create a new instance:
122
123
@@ -129,13 +130,15 @@ Levels are as follows:
129
130
0. All colors disabled
130
131
1. Basic color support (16 colors)
131
132
2. 256 color support
132
-
3.RGB/Truecolor support (16 million colors)
133
+
3. Truecolor support (16 million colors)
133
134
134
135
### chalk.supportsColor
135
136
136
137
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
137
138
138
-
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
139
+
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
140
+
141
+
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
139
142
140
143
141
144
## Styles
@@ -145,23 +148,31 @@ Can be overridden by the user with the flags `--color` and `--no-color`. For sit
145
148
-`reset`
146
149
-`bold`
147
150
-`dim`
148
-
-`italic`*(not widely supported)*
151
+
-`italic`*(Not widely supported)*
149
152
-`underline`
150
153
-`inverse`
151
154
-`hidden`
152
-
-`strikethrough`*(not widely supported)*
155
+
-`strikethrough`*(Not widely supported)*
153
156
154
157
### Colors
155
158
156
159
-`black`
157
160
-`red`
158
161
-`green`
159
162
-`yellow`
160
-
-`blue`*(on Windows the bright version is used since normal blue is illegible)*
163
+
-`blue`*(On Windows the bright version is used since normal blue is illegible)*
161
164
-`magenta`
162
165
-`cyan`
163
166
-`white`
164
167
-`gray`
168
+
-`blackBright`
169
+
-`redBright`
170
+
-`greenBright`
171
+
-`yellowBright`
172
+
-`blueBright`
173
+
-`magentaBright`
174
+
-`cyanBright`
175
+
-`whiteBright`
165
176
166
177
### Background colors
167
178
@@ -173,15 +184,23 @@ Can be overridden by the user with the flags `--color` and `--no-color`. For sit
173
184
-`bgMagenta`
174
185
-`bgCyan`
175
186
-`bgWhite`
187
+
-`bgBlackBright`
188
+
-`bgRedBright`
189
+
-`bgGreenBright`
190
+
-`bgYellowBright`
191
+
-`bgBlueBright`
192
+
-`bgMagentaBright`
193
+
-`bgCyanBright`
194
+
-`bgWhiteBright`
176
195
177
196
178
-
## 256/16 million (Truecolor) color support
197
+
## 256 and Truecolor color support
179
198
180
-
Chalk supports 256 colors and, when manually specified, [Truecolor (16 million colors)](https://gist.github.com/XVilka/8346728)on all supported terminal emulators.
199
+
Chalk supports 256 colors and[Truecolor](https://gist.github.com/XVilka/8346728)(16 million colors) on supported terminal apps.
181
200
182
-
Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying {level: n} as a chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
201
+
Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
-`apple` (see [qix-/color-convert#30](https://github.com/Qix-/color-convert/issues/30))
212
-
213
-
For a complete list of color models, see [`color-convert`'s list of conversions](https://github.com/Qix-/color-convert/blob/master/conversions.js).
0 commit comments