sfcode
An Online Competing and Development Environment
|
Contributing
Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).
Please consider following this project's author, Brian Woodward, and consider starring the project to show your :heart: and support.
Install with npm:
ansi-colors is the fastest Node.js library for terminal styling. A more performant drop-in replacement for chalk, with no dependencies.
String.prototype
like colors.ansi-colors
does not have the nested styling bug found in colorette, chalk, and kleur.
Results in the following
(sans icons and labels)
Easily enable/disable colors.
Use the .unstyle
method to strip ANSI codes from a string.
Note that bright and bright-background colors are not always supported.
Colors | Background Colors | Bright Colors | Bright Background Colors |
---|---|---|---|
black | bgBlack | blackBright | bgBlackBright |
red | bgRed | redBright | bgRedBright |
green | bgGreen | greenBright | bgGreenBright |
yellow | bgYellow | yellowBright | bgYellowBright |
blue | bgBlue | blueBright | bgBlueBright |
magenta | bgMagenta | magentaBright | bgMagentaBright |
cyan | bgCyan | cyanBright | bgCyanBright |
white | bgWhite | whiteBright | bgWhiteBright |
gray | |||
grey |
_(gray
is the U.S. spelling, grey
is more commonly used in the Canada and U.K.)_
Libraries tested
MacBook Pro, Intel Core i7, 2.3 GHz, 16 GB.
Load time
Time it takes to load the first time require()
is called:
1.915ms
12.437ms
Benchmarks
Windows 10, Intel Core i7-7700k CPU @ 4.2 GHz, 32 GB
Load time
Time it takes to load the first time require()
is called:
1.494ms
11.523ms
Benchmarks
<details>
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
</details>
<details>
Running Tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
</details>
<details>
Building docs
_(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)_
To generate the readme, run the following command:
</details>
You might also be interested in these projects:
Commits | Contributor |
---|---|
42 | doowb |
38 | jonschlinkert |
6 | lukeed |
2 | Silic0nS0ldier |
1 | dwieeb |
1 | jorgebucaran |
1 | madhavarshney |
1 | chapterjason |
Brian Woodward
Please consider supporting me on Patreon, or start your own Patreon page!
Copyright © 2019, Brian Woodward. Released under the [MIT License](LICENSE).
This file was generated by verb-generate-readme, v0.8.0, on March 03, 2019.