@@ -105,7 +105,7 @@ Both are [recommended](https://github.com/es-tooling/module-replacements/blob/ma
105
105
The package size in ` node_modules ` directory:
106
106
107
107
- ` picocolors ` : [ 6.37 kB] [ npm-picocolors ] (not minimized) - A micro library with basic features.
108
- - ` аnsis ` : [ 5.92 kB] [ npm-ansis ] (minimized) - A powerful library with a rich set of features.
108
+ - ` аnsis ` : [ 5.87 kB] [ npm-ansis ] (minimized) - A powerful library with a rich set of features.
109
109
- ` chalk ` : [ 44.2 kB] [ npm-chalk ] (not minimized) - Provides similar functionality to Ansis.
110
110
111
111
### ⚡ Performance
@@ -115,7 +115,7 @@ The package size in `node_modules` directory:
115
115
- ` chalk ` : Slower than both ** Ansis** and ** Picocolors** in all use cases.
116
116
117
117
> [ !CAUTION]
118
- > ** Picocolors** doesn't handle important ** edge cases** , so it is the fastest and smallest .
118
+ > ** Picocolors** doesn't handle important ** edge cases** , so it is the fastest.
119
119
>
120
120
> ** Picocolors** is faster only in a [ simple] ( #bench-simple ) micro-benchmark, which does not reflect real world usage.\
121
121
> In a more complex benchmark, ** Ansis** is much [ closer] ( #bench-picocolors-complex ) to ** Picocolors** results or even [ faster] ( #bench-3-styles ) .
@@ -214,7 +214,7 @@ As of 2025, only **Ansis**, **Chalk**, and **Picocolors** are actively maintaine
214
214
- ☑️ Picocolors: ` CJS ` only
215
215
- ☑️ Chalk: ` ESM ` only
216
216
- Does it matter the unpacked size?
217
- - ✅ [ Ansis - 5.92 kB] [ npm-ansis ]
217
+ - ✅ [ Ansis - 5.87 kB] [ npm-ansis ]
218
218
- ✅ [ Picocolors - 6.37 kB] [ npm-picocolors ]
219
219
- ❌ [ Chalk - 44.2 kB] [ npm-chalk ]
220
220
- Does it matter if a library performs [ ~ 60 million] ( #bench-simple ) or [ ~ 100 million] ( #bench-simple ) ** ops/sec** when outputting to the terminal?
@@ -374,16 +374,18 @@ italic.bold.yellow.bgMagentaBright`text`;
374
374
375
375
## ANSI 16 colors
376
376
377
- | Standard Colors | Bright Colors | Standard Backgrounds | Bright Backgrounds |
378
- | :-----------------| :----------------| :---------------------| :-------------------|
379
- | ` black ` | ` gray ` | ` bgBlack ` | ` bgGray ` |
380
- | ` red ` | ` redBright ` | ` bgRed ` | ` bgRedBright ` |
381
- | ` green ` | ` greenBright ` | ` bgGreen ` | ` bgGreenBright ` |
382
- | ` yellow ` | ` yellowBright ` | ` bgYellow ` | ` bgYellowBright ` |
383
- | ` blue ` | ` blueBright ` | ` bgBlue ` | ` bgBlueBright ` |
384
- | ` magenta ` | ` magentaBright ` | ` bgMagenta ` | ` bgMagentaBright ` |
385
- | ` cyan ` | ` cyanBright ` | ` bgCyan ` | ` bgCyanBright ` |
386
- | ` white ` | ` whiteBright ` | ` bgWhite ` | ` bgWhiteBright ` |
377
+ There are 16 basic colors: 8 standard and 8 bright variants.
378
+
379
+ | Example | Color | Background | Bright Example | Bright Color | Bright Background |
380
+ | :---------------------------------:| :---------------| :--------------------| :---------------------------------------:| :----------------| :------------------|
381
+ | ![ ] ( docs/img/colors/black.png ) | ` black ` | ` bgBlack ` | ![ ] ( docs/img/colors/gray.png ) | ` gray ` | ` bgGray ` |
382
+ | ![ ] ( docs/img/colors/red.png ) | ` red ` | ` bgRed ` | ![ ] ( docs/img/colors/redBright.png ) | ` redBright ` | ` bgRedBright ` |
383
+ | ![ ] ( docs/img/colors/green.png ) | ` green ` | ` bgGreen ` | ![ ] ( docs/img/colors/greenBright.png ) | ` greenBright ` | ` bgGreenBright ` |
384
+ | ![ ] ( docs/img/colors/yellow.png ) | ` yellow ` | ` bgYellow ` | ![ ] ( docs/img/colors/yellowBright.png ) | ` yellowBright ` | ` bgYellowBright ` |
385
+ | ![ ] ( docs/img/colors/blue.png ) | ` blue ` | ` bgBlue ` | ![ ] ( docs/img/colors/blueBright.png ) | ` blueBright ` | ` bgBlueBright ` |
386
+ | ![ ] ( docs/img/colors/magenta.png ) | ` magenta ` | ` bgMagenta ` | ![ ] ( docs/img/colors/magentaBright.png ) | ` magentaBright ` | ` bgMagentaBright ` |
387
+ | ![ ] ( docs/img/colors/cyan.png ) | ` cyan ` | ` bgCyan ` | ![ ] ( docs/img/colors/cyanBright.png ) | ` cyanBright ` | ` bgCyanBright ` |
388
+ | ![ ] ( docs/img/colors/white.png ) | ` white ` | ` bgWhite ` | ![ ] ( docs/img/colors/whiteBright.png ) | ` whiteBright ` | ` bgWhiteBright ` |
387
389
388
390
389
391
<a name =" gray-naming-in-libs " ></a >
@@ -1156,7 +1158,7 @@ c.red(1/0) // 'Infinity' in red
1156
1158
1157
1159
| Package | Dependencies | Minified | Unpacked Size | Tarball size |
1158
1160
| :-----------------------------| :------------------------------:| ------------------| ---------------------------------------------------------:| -----------------------------------------------------------------------:|
1159
- | [ ` ansis ` ] [ ansis ] | [ 0] [ npm-ansis ] | uglified & minified | [ 5.92 kB] [ npm-ansis ] | [ 3.5 kB] ( https://arve0.github.io/npm-download-size/#ansis ) |
1161
+ | [ ` ansis ` ] [ ansis ] | [ 0] [ npm-ansis ] | uglified & minified | [ 5.87 kB] [ npm-ansis ] | [ 3.5 kB] ( https://arve0.github.io/npm-download-size/#ansis ) |
1160
1162
| [ ` picocolors ` ] [ picocolors ] | [ 0] [ npm-picocolors ] | no | [ 6.37 kB] [ npm-picocolors ] | [ 2.6 kB] ( https://arve0.github.io/npm-download-size/#picocolors ) |
1161
1163
| [ ` tinyrainbow ` ] [ tinyrainbow ] | [ 0] [ npm-tinyrainbow ] | uglified | [ 8.1 kB] [ npm-tinyrainbow ] | [ 3.2 kB] ( https://arve0.github.io/npm-download-size/#tinyrainbow ) |
1162
1164
| [ ` colorette ` ] [ colorette ] | [ 0] [ npm-colorette ] | no | [ 17.0 kB] [ npm-colorette ] | [ 4.9 kB] ( https://arve0.github.io/npm-download-size/#colorette ) |
0 commit comments