Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including kuler with all npm packages installed. Try it out:

var kuler = require("kuler")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

kuler v2.0.0

Color your terminal using CSS/hex color codes


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.


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

npm install --save kuler


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.



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free