Skip to content

Latest commit

 

History

History
88 lines (54 loc) · 1.95 KB

README.md

File metadata and controls

88 lines (54 loc) · 1.95 KB

colour-cursive

NPM

Install locally

npm install colour-cursive

or globally

npm install colour-cursive -g

I like colours (specifically chalk) but I hate all the typing I have to do for it to work. I am working on this often and publishing a lot so make sure you update often. Leave an issue if theres an issue or if you want me to add something. Pull requests are also welcome.

I have recently added xTerm colour support. I will write actual documentation soon. For now here's a quick guide on how to use this. For a complete list of colours enter the command below.

This packages is set up so there is no need for console.log();. The module will print it to the screen for you.

$ cd node_modules/colour-cursive; npm test;
var cc = require("colour-cursive");

// red
cc.red("I am a red string");


// yellow
cc.yellow("I am a yellow string");


// green
cc.green("I am a green string");


// blue
cc.blue("I am a blue string");


// cyan
cc.cyan("I am a cyan string");


// magenta
cc.magenta("I am a magenta string");


// gray
cc.gray("I am a gray string");

// Backgrounds \\

// background black
cc.bg("I have a black background", "black");

// background red
cc.bg("I have a red background", "red");

// background green
cc.bg("I have a green background", "green");

// background yellow
cc.bg("I have a yellow background", "yellow");

// background blue
cc.bg("I have a blue background", "blue");

// background magenta
cc.bg("I have a magenta background", "magenta");

// background cyan
cc.bg("I have a cyan background", "cyan");

// background white
cc.bg("I have a white background", "white");


//Foreground xTerm colours \\
cc.xText(string, int);

//Background xTerm colours \\
cc.xBg(string, int);