Skip to content
/ colr Public

Ansi escaped color styling for the console/terminal

License

Notifications You must be signed in to change notification settings

akileez/colr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colr

Installation

$ npm install akileez\colr

Usage

const { red, blue, bold, underline, bbBlue, black, green, yellow, cyan, magenta } = require('colr')

log(
  blue(`I'm blue`),
  bold(blue('da ba dee')),
  underline(bold(blue('da ba daa')))
)

log(`
  There's a ${underline(blue('house'))},
  With a ${bold(blue('window'))},
  And a ${blue('corvette')}
  ${bbBlue(black('And everything is blue'))}
`)

log(bold(`I'm ${blue(`da ba ${underline('dee')} da ba`)} daa`))

log(`${red('Da')} ${blue('ba')} ${yellow('dee')} ${green('da')} ${cyan('ba')} ${magenta('daa')}`)

colr output

Supported styles

Colors Background Colors Bright Colors Bright Background Colors Modifiers
black bgBlack brBlack bbBlack dim
red bgRed brRed bbRed bold
green bgGreen brGreen bbGreen hidden
yellow bgYellow brYellow bbYellow italic
blue bgBlue brBlue bbBlue underline
magenta bgMagenta brMagenta bbMagenta strikethrough
cyan bgCyan brCyan bbCyan reset
white bgWhite brWhite bbWhite
gray bgGray brGray bbGray
grey bgGrey brGrey bbGrey

API

Why?

See Also

License

ISC

Releases

No releases published

Packages

No packages published