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 🙏

© 2025 – Pkg Stats / Ryan Hefner

termstyle-plus

v1.1.0

Published

The most comprehensive and powerful terminal styling library with extensive color support, gradients, animations, and special effects - TypeScript Edition

Readme

TermStyle Plus 🎨

A powerful and feature-rich terminal styling library for Node.js with TypeScript support, extensive color options, and beautiful effects.

📦 Installation

npm install termstyle-plus

🚀 Quick Start

import style from 'termstyle-plus';

// Basic colors
console.log(style.red('This is red text'));
console.log(style.blue('This is blue text'));
console.log(style.green('This is green text'));

// Background colors
console.log(style.bgRed('Text with red background'));
console.log(style.bgBlue('Text with blue background'));

// Text styles
console.log(style.bold('Bold text'));
console.log(style.italic('Italic text'));
console.log(style.underline('Underlined text'));

// Special effects
console.log(style.rainbow('Rainbow text'));
console.log(style.neon('Neon text', 'blue'));

// Box styles
console.log(style.box('Hello World', 'double'));

🎨 Available Features

Basic Colors

// Standard colors
style.black('Black text')
style.red('Red text')
style.green('Green text')
style.yellow('Yellow text')
style.blue('Blue text')
style.magenta('Magenta text')
style.cyan('Cyan text')
style.white('White text')

// Bright variants
style.brightRed('Bright red text')
style.brightGreen('Bright green text')
style.brightBlue('Bright blue text')
// ... and more

🌈 Extended Colors

// Nature colors
style.forest('Forest green')
style.ocean('Ocean blue')
style.sunset('Sunset orange')
style.dawn('Dawn pink')
style.earth('Earth brown')
style.sand('Sand colored')

// Precious stones
style.emerald('Emerald')
style.ruby('Ruby')
style.sapphire('Sapphire')
style.amethyst('Amethyst')
style.pearl('Pearl')
style.opal('Opal')
style.garnet('Garnet')

// Neon colors
style.neonPink('Neon pink')
style.neonBlue('Neon blue')
style.neonGreen('Neon green')
style.neonOrange('Neon orange')
style.neonYellow('Neon yellow')
style.neonPurple('Neon purple')

// Pastel colors
style.pastelPink('Pastel pink')
style.pastelBlue('Pastel blue')
style.pastelGreen('Pastel green')
style.pastelYellow('Pastel yellow')
style.pastelPurple('Pastel purple')
style.pastelOrange('Pastel orange')

🎯 Background Colors

Add bg prefix to any color:

style.bgRed('Red background')
style.bgBlue('Blue background')
style.bgNeonPink('Neon pink background')
style.bgPastelBlue('Pastel blue background')

✨ Text Styles

style.bold('Bold text')
style.italic('Italic text')
style.dim('Dim text')
style.underline('Underlined text')
style.blink('Blinking text')
style.reverse('Reversed text')
style.hidden('Hidden text')
style.strikethrough('Strikethrough text')
style.doubleUnderline('Double underlined text')
style.overline('Overlined text')

🎆 Special Effects

Rainbow Text

style.rainbow('Rainbow colored text');

Neon Effect

type NeonColor = 'blue' | 'pink' | 'green' | 'orange' | 'yellow' | 'purple';
style.neon('Glowing text', 'blue');

Gradient

interface RGB {
  r: number;
  g: number;
  b: number;
}

style.gradient('Gradient text', 
  { r: 255, g: 0, b: 0 },    // Start color (red)
  { r: 0, g: 0, b: 255 }     // End color (blue)
);

Multi-gradient

style.multiGradient('Multi-color gradient', [
  { r: 255, g: 0, b: 0 },    // Red
  { r: 0, g: 255, b: 0 },    // Green
  { r: 0, g: 0, b: 255 }     // Blue
]);

📦 Box Styles

type BoxStyle = 'single' | 'double' | 'round' | 'bold';

style.box('Text in a box', 'single');
style.box('Double bordered box', 'double');
style.box('Round bordered box', 'round');
style.box('Bold bordered box', 'bold');

🎨 RGB & HSL Colors

RGB Colors

style.rgb(255, 100, 0)('Custom RGB color');
style.bgRgb(100, 200, 255)('Custom RGB background');

HSL Colors

style.hsl(330, 100, 50)('Custom HSL color');
style.bgHsl(200, 100, 50)('Custom HSL background');

🔗 Combining Styles

Chain multiple styles together:

style.chain('bold', 'underline', 'red')('Bold, underlined, red text');

// Combine with special effects
style.box(style.rainbow('Rainbow in a box'), 'double');
style.neon(style.box('Neon box', 'round'), 'blue');

🎯 Example

Here's a more complex example showing various features:

import style from 'termstyle-plus';

// Create a fancy header
console.log(style.box(
  style.bold(style.neon('Welcome to My App', 'blue')),
  'double'
));

// Show some status information
console.log(style.green('✓ Connected to database'));
console.log(style.yellow('⚠ Cache is outdated'));
console.log(style.red('✗ API endpoint unreachable'));

// Create a gradient title
console.log(style.gradient(
  'System Status',
  { r: 255, g: 100, b: 0 },
  { r: 0, g: 100, b: 255 }
));

// Show some metrics
console.log(style.box(`
${style.bold('Memory Usage:')} ${style.green('45%')}
${style.bold('CPU Load:')} ${style.yellow('78%')}
${style.bold('Disk Space:')} ${style.red('92%')}
`, 'round'));

📄 License

MIT