terminal-palette

0.0.8 • Public • Published

🎨 Terminal Palette

Terminal Pallette allows you to call methods on your strings to change the style (limited), color or background you log to the terminal.

I wanted something similar to Chalk with the ability to call the methods on a string. Terminal Palette uses the package ansi-styles

Note: This will polutte the string object adding to the prototype of String

Styles

Modifiers

  • reset
  • bold
  • dim
  • italic (Not widely supported)
  • underline
  • inverse
  • hidden
  • strikethrough (Not widely supported)

Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray ("bright black")
  • redBright
  • greenBright
  • yellowBright
  • blueBright
  • magentaBright
  • cyanBright
  • whiteBright

Background colors

  • bgBlack
  • bgRed
  • bgGreen
  • bgYellow
  • bgBlue
  • bgMagenta
  • bgCyan
  • bgWhite
  • bgBlackBright
  • bgRedBright
  • bgGreenBright
  • bgYellowBright
  • bgBlueBright
  • bgMagentaBright
  • bgCyanBright
  • bgWhiteBright

e.g.

// require in library, this will add it feature to strings
require('terminal-palette')
 
console.log("This text will be blue".blue())
 
// Template string example, chain example
console.log(`hello ${'world'.red().bgYellow()}`.blue())

Dependents (0)

Package Sidebar

Install

npm i terminal-palette

Weekly Downloads

0

Version

0.0.8

License

ISC

Last publish

Collaborators

  • ruegen