Skip to content

rao123dk/console-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

console-color

console-color is a lightweight, dependency-free JavaScript library that allows you to easily add colors to your console output based on user preferences. With a size of less than 4KB, it's perfect for enhancing the readability of your CLI applications without adding bloat.

green

green

green

green

Features

  • No Dependencies: console-color is completely standalone.
  • Tiny Size: Less than 4KB.
  • Easy to Use: Simple and intuitive API for adding colors to console output.
  • Customizable: Support for various colors to match user preferences.

install

npm i @rao123dk/console-color

yarn add @rao123dk/console-color

setup

Require the Library in Your Entry File In your index.js file, require your @rao123dk/console-color library:

require(`@rao123dk/console-color`)

use

console.log.red('red color');

red

console.log.green('green color');

green

console.log.green.bold('Success: Operation completed successfully.');

green

console.log.yellow('yellow color');

yellow

console.log.blue('blue color');
console.log.magenta('magenta color');
console.log.cyan('cyan color');
console.log.white('white color');

Example

console.log.red('Error: Something went wrong!');
console.log.green('Success: Operation completed successfully.');
console.log.blue('Info: Please check the details below.');
console.log.yellow('Warning: Please be cautious.');
console.log.cyan('Debug: Variable value is undefined.');
console.log.magenta('Notice: This is an important notice.');
console.log.white('General: This is a general message.');

console.log.blue.italic('Info: Please check the details below.');
console.log.yellow.underline('Warning: Please be cautious.');
console.log.white.background('General: This is a general message.');

Contributing

We welcome contributions! If you'd like to contribute, please fork the repository and submit a pull request.

License

@rao123dk/console-color is licensed under the MIT License. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published