Skip to content
shwibi edited this page Jun 18, 2021 · 2 revisions

Colors

Use Colors to colorize your console output! The usage is pretty easy:

const shwijs = require("shwi-js");
console.log(shwijs.Colorize("Yellow!", "yellow"));
// Logs "Yellow!" in yellow color

You can also pass in multiple parameters (for dim, background, etc.)

shwijs.Colorize("Background is cyan, I am black!", "black", "BgCyan");

NOTE: The color parameters must be exactly same as the ones in the Colors object (shwijs#Colors)

shwijs#Colorize(string, ...colors?)

You can pass in multiple options one by one as individual parameters.

shwijs#Colors

This is an object of all the colors for the node.js console. Putting any of these values before a string will give that string the specified color/specialty. Keep in mind, you need to reset the console back to normal after the string, otherwise all other logs after your string log will be formatted in the same way!

NOTE: If you want more functionality, please use the colors package. It offers much more options and better customisation and formatting, etc. Overall, it's just must better if you want a better color panel.

v1.1.1

Updates

Feel free to open an Issue if you find anything wrong in the module! Or open a new Discussion if you have any suggestions, or just want to give a feedback!

Notes

The latest STABLE version is v1.0.0 with the addition of Physics* (depracated from v1.1.0^).

: v1.1.1 Fixed README
: v1.1.0 Released new Physics
: v0.0.5-beta.2 Released something
: v0.0.5-beta Released, countdown docs
: v0.0.4 Released
: v0.0.4-alpha.6 fix parser
: v0.0.4-alpha.5 npm update
: v0.0.4-alpha.4 (No additions except documentation edits)
: v0.0.4-alpha.2 Added tank, props, and functions.
: v0.0.4-alpha.1 has nothing new in it, it is just fixation of documentation on npm

Clone this wiki locally