kuler
Color your terminal using CSS/hex color codes
Last updated 5 years ago by 3rdeden .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install kuler 
SYNC missed versions from official npm registry.

kuler

Kuler is small and nifty node module that allows you to create terminal based colors using hex color codes, just like you're used to doing in your CSS. We're in a modern world now and terminals support more than 16 colors so we are stupid to not take advantage of this.

Installation

The package is released in the public npm registry and can be installed by running:

npm install --save kuler

Usage

To color a string simply pass it the string you want to have colored as first argument and the color as hex as second argument:

'use strict';

const kuler = require('kuler');
const str = kuler('foo', '#FF6600');

The color code sequence is automatically terminated at the end of the string so the colors do no bleed to other pieces of text. So doing:

console.log(kuler('red', '#F00'), 'normal');

Will work without any issues.

License

MIT

Current Tags

  • 2.0.0                                ...           latest (5 years ago)

4 Versions

  • 2.0.0                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           7 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |