0.0.8 • Published 7 years ago

terminal-palette v0.0.8

Weekly downloads
10
License
ISC
Repository
github
Last release
7 years ago

🎨 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())
0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

1.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago