JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32506F
  • License MIT

Nord theme colors for the terminal with the help of chalk

Package Exports

  • nordchalk

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nordchalk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nordchalk

This mashup of chalk and Nord exists to make it easier to use Nord theme colors when creating command line applications. Its a thin wrapper around chalk, you may be able to manage without it. Nordchalk is not affliated with either of these projects.

Install

$ npm install nordchalk

Usage

const nordchalk = require( 'nordchalk');

console.log( nordchalk.aurora0( 'Hello world!'));

As it is a thin wrapper around chalk, you still have access to all of the chalk styles (bold, underline etc) but these need to come AFTER the color name. It is NOT possible to chain the nord colors unfortunately, though you can chain the normal chalk colors (red, green, bgRed etc).

const nordchalk = require( 'nordchalk');

console.log( nordchalk.aurora0.bold( 'Hello world!'));
console.log( nordchalk.bgsnowstorm1.red( 'snowstorm background with red text!'));

I will often assign the colors to a variable that better describes its use and this makes it easier to change the colors if I need to

const nordchalk = require( 'nordchalk');
const error = nordchalk.aurora0.bold ;
const warning = nordchalk.aurora1 ;

console.log( warning( 'Things are starting to look bad'));
console.log( error( 'Oh Noes, its all broken!'));

Colors available

  • The full pallette nord0 .. nord15, background colors bgNord0 .. bgNord15
  • Polar Night polarnight0 .. polarnight3, background colors bgPolarnight0 .. bgPolarnight3
  • Snow Storm snowstorm0 .. snowstorm2, background colors bgSnowstorm0 .. bgSnowstorm2
  • Frost frost0 .. frost3, background colors bgFrost0 .. bgFrost3
  • Aurora aurora0 .. aurora4, background colors bgAurora0 .. bgAurora4