cmd-colour

1.0.0 • Public • Published

colour

Add colour to your terminal/console.

Four ways to add colour:

  1. colour.log[colour] (text);
colour.log.black("black");
colour.log.red("red");
colour.log.green("green");
colour.log.yellow("yellow");
colour.log.blue("blue");
colour.log.magenta("magenta");
colour.log.cyan("cyan");
colour.log.white("white");
colour.log.std("std");
colour.log.bold("bold");
colour.log.parse("<blue>col<yellow>our<red>ful");
  1. let colourText = Colour.text[colour];
console.log(colour.text.black("black"));
console.log(colour.text.red("red"));console.log(colour.text.green("green"));
console.log(colour.text.yellow("yellow"));
console.log(colour.text.blue("blue"));
console.log(colour.text.magenta("magenta"));
console.log(colour.text.cyan("cyan"));
console.log(colour.text.white("white"));
console.log(colour.text.std("std"));
console.log(colour.text.bold("bold"));
  1. colour.parse(markup);
let colourful = "A \<red>col\<yellow>our\<green>ful \<red>sentence \<green>to \<yellow>make \<blue>reading \<magenta>your \<cyan>terminal \<white>easier."; 
colourful = colour.parse(colourful);
console.log(colourful);
  1. colour.log.parse(markup);
colour.log.parse("\<blue>col\<yellow>our\<red>ful");

Package Sidebar

Install

npm i cmd-colour

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

4.47 kB

Total Files

4

Last publish

Collaborators

  • thedecimalspace