npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

clr-js

v1.0.1

Published

The dead-simple terminal colors for Node.js.

Readme

Clr.js - The dead-simple terminal colors for Node.js.

Clr is a dead simple color library for nodejs to colorize things and put some styles to your strings in your terminal. It's a Work-in-progress (WIP) currently in the 1.0.0 version, yay!

Actually clr-js is just a project for fun, to learn new things and to play with some nice features of the world of development. If you have a better approach to this, please, contribute! Or if you just want to install for create your terminal based apps, feel free to do it.

This is my first open-source contribution, so if you find any errors, bugs or something bad, please report and let's learn together. :smile:

Getting started

Installation

  • With NPM: npm install clr-js

  • With Yarn: yarn add clr-js


Usage (New 1.0.0 version)

This 1.0.0 version introduces the chaining methods for Clr-js! To use in your Javascript/Typescript file:

const clr = require('clr-js');

// A bold and yellow text will be shown in your terminal!
console.log(
  clr.bold('Hello, javascript colorful world!')
     .yellow()
     .it();
)
import * as clr from '../clr';

console.log(
  clr.bold('Hello, typescript colorful world!')
     .blue()
     .it();
)

Notice: You only need to declare the string you'll paint in the first method.

Notice2: A little tweak was made for finish the method chaining: when you done calling all your methods, finish the chain with .it().

API (ver. 1.0.0)

Colors:

Color | Applying to text | Applying to background ------------|---------------------------|----------------------- Blue | clr.blue(<str>).it() | clr.bblue(<str>).it() Red | clr.red(<str>).it() | clr.bred(<str>).it() Yellow | clr.yellow(<str>).it() | clr.byellow(<str>).it() Green | clr.green(<str>).it() | clr.bgreen(<str>).it() Cyan | clr.cyan(<str>).it() | clr.bcyan(<str>).it() Magenta | clr.magenta(<str>).it() | clr.bmagenta(<str>).it() White | clr.white(<str>).it() | clr.bwhite(<str>).it() Black | clr.black(<str>).it() | clr.bblack(<str>).it()

Special Text Formatting

Text Formatting | Method ----------------|-------- Bold text | clr.bold(<str>).it() Underlined | clr.uline(<str>).it() Dark text | clr.darky(<str>).it() Stroke | clr.stroke(<str>).it()

Applying Special formatting and colors in texts:

const clr = require('clr-js');

let stringy = 'My colorful string.';

// Bold and blue text;
console.log(
  clr.bold(stringy)
     .blue()
     .it();
)

// Bold, underlined magenta-colored text;
console.log(
  clr.bold(stringy)
     .uline()
     .magenta()
     .it();
)

// White background with black text;
console.log(
  clr.bwhite(stringy)
     .black()
     .it();
)

// Or just use inline
console.log(
  clr.bwhite(stringy).black().it();
)


The guide bellow refers to the old version of Clr-js, and is not compatible with 1.0.0!

Usage (ver. 0.1.7 and bellow only)

To use in your Javascript/Typescript file:

const clr = require('clr-js');

// A bold and blue text will be shown in your terminal!
console.log(clr.bold(clr.blue('Hello, colorful world!')))

API

Colors:

Color | Applying to text | Applying to background ------------|----------------------|----------------------- Blue | clr.blue(<str>) | clr.bblue(<str>) Red | clr.red(<str>) | clr.bred(<str>) Yellow | clr.yellow(<str>) | clr.byellow(<str>) Green | clr.green(<str>) | clr.bgreen(<str>) Cyan | clr.cyan(<str>) | clr.bcyan(<str>) Magenta | clr.magenta(<str>) | clr.bmagenta(<str>) White | clr.white(<str>) | clr.bwhite(<str>) Black | clr.black(<str>) | clr.bblack(<str>)

Special Text Formatting

Text Formatting | Method ----------------|-------- Bold text | clr.bold(<str>) Underlined | clr.uline(<str>) Dark text | clr.darky(<str>) Stroke | clr.stroke(<str>)

Applying Special formatting in colored texts:

let stringy = 'My colorful string.';

console.log( clr.bold(clr.blue(stringy)) ) // Bold and blue text;
console.log( clr.bold(clr.uline(clr.magenta(stringy))) ) // Bold, underlined magenta-colored text;
console.log( clr.bwhite(clr.black(stringy)) ) // White background with black text;