tynt

1.2.0 • Public • Published

Tynt

A tactile color library for Node.js' console.

Tynt is very easy to use, here is a quick example:

var tynt = require("tynt");
 
console.log("The blue " + tynt.Blue("Chicken") + " ate a red " + tynt.Red("seed") + ".")

Installation

Using NPM:

npm i tynt

List of Colors

Here is a reference of pre-defined colors that you don't need to add yourself.

tynt.Reset
tynt.Bright
tynt.Dim
tynt.Underscore
tynt.Blink
tynt.Reverse
tynt.Hidden
 
tynt.Black
tynt.Red
tynt.Green
tynt.Yellow
tynt.Blue
tynt.Magenta
tynt.Cyan
tynt.White
 
tynt.BgBlack
tynt.BgRed
tynt.BgGreen
tynt.BgYellow
tynt.BgBlue
tynt.BgMagenta
tynt.BgCyan
tynt.BgWhite

Adding Presets/Prefixes

tynt.add("name","John")
 
console.log("Hello, " + tynt.name("") + ".") // Hello, John.
tynt.add("err",tynt.Red("Error: "))
 
console.log(tynt.err("Well this sucks.")) // Error: Well this sucks.

Variables

Tynt has built in variables to help when making Presets/Prefixes.

// {text}
tynt.add("Hello","Hello, {text}!")
 
console.log(tynt.Hello("John")) // Hello, John!
// Before, without variables (NOT SUPPORTED BY 1.0)
tynt.add("Hello","Hello, ")

console.log(tynt.Hello("James") + "!") // Hello, James!

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i tynt

      Weekly Downloads

      264

      Version

      1.2.0

      License

      MIT

      Unpacked Size

      3.62 kB

      Total Files

      4

      Last publish

      Collaborators

      • faztasio