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

aschalk

v1.0.0

Published

A beautiful terminal styling library with gradient support, designed for CLI tools and pretty logs.

Readme

AsChalk 🎨

A beautiful terminal styling library with gradient support, designed for CLI tools and pretty logs.

Made by Relmzey (Nexta Development)

🚀 Installation

npm install aschalk

📖 Quick Start

const ctr = require("aschalk");

console.log(ctr.red("Error message"));
console.log(ctr.green("Success message"));
console.log(ctr.gradient("Beautiful gradient!", ["#ff0000", "#00ff00"]));

🎨 Features

  • Easy to use - Simple API with intuitive method names
  • Gradient support - Create beautiful color gradients
  • Preset gradients - Rainbow, sunset, morning, and more
  • Styled messages - Built-in success, error, info, and warning styles
  • Full color support - Basic colors, background colors, hex, RGB, HSL
  • Text styling - Bold, italic, underline, strikethrough, dim
  • Method chaining - Chain multiple styles together
  • CommonJS & ESM - Compatible with both module systems

🔥 Basic Usage

Basic Colors

const ctr = require("aschalk");

console.log(ctr.red("Red text"));
console.log(ctr.green("Green text"));
console.log(ctr.blue("Blue text"));
console.log(ctr.yellow("Yellow text"));
console.log(ctr.magenta("Magenta text"));
console.log(ctr.cyan("Cyan text"));
console.log(ctr.white("White text"));
console.log(ctr.gray("Gray text"));

Text Styling

console.log(ctr.bold("Bold text"));
console.log(ctr.italic("Italic text"));
console.log(ctr.underline("Underlined text"));
console.log(ctr.strikethrough("Strikethrough text"));
console.log(ctr.dim("Dim text"));

Background Colors

console.log(ctr.bgRed("Red background"));
console.log(ctr.bgGreen("Green background"));
console.log(ctr.bgBlue("Blue background"));
console.log(ctr.bgYellow("Yellow background"));

🌈 Gradient Magic

Custom Gradients

// Two colors
console.log(ctr.gradient("Hello World", ["#ff0000", "#00ff00"]));

// Multiple colors
console.log(ctr.gradient("Amazing!", ["#ff6b6b", "#4ecdc4", "#45b7d1"]));

Preset Gradients

console.log(ctr.rainbow("Rainbow colors!"));
console.log(ctr.sunset("Sunset vibes"));
console.log(ctr.morning("Morning light"));

💬 Styled Messages

Perfect for CLI tools and logging:

console.log(ctr.success("Task completed successfully"));
console.log(ctr.error("Something went wrong"));
console.log(ctr.info("Here's some information"));
console.log(ctr.warn("Be careful with this"));

🎯 Advanced Colors

Hex Colors

console.log(ctr.hex("#ff6b6b", "Custom hex color"));

RGB Colors

console.log(ctr.rgb(255, 107, 107, "Custom RGB color"));

HSL Colors

console.log(ctr.hsl(0, 100, 80, "Custom HSL color"));

📋 Complete API Reference

Basic Colors

  • ctr.red(text) - Red text
  • ctr.green(text) - Green text
  • ctr.blue(text) - Blue text
  • ctr.yellow(text) - Yellow text
  • ctr.magenta(text) - Magenta text
  • ctr.cyan(text) - Cyan text
  • ctr.white(text) - White text
  • ctr.black(text) - Black text
  • ctr.gray(text) / ctr.grey(text) - Gray text

Text Styling

  • ctr.bold(text) - Bold text
  • ctr.dim(text) - Dim text
  • ctr.italic(text) - Italic text
  • ctr.underline(text) - Underlined text
  • ctr.strikethrough(text) - Strikethrough text

Background Colors

  • ctr.bgRed(text) - Red background
  • ctr.bgGreen(text) - Green background
  • ctr.bgBlue(text) - Blue background
  • ctr.bgYellow(text) - Yellow background
  • ctr.bgMagenta(text) - Magenta background
  • ctr.bgCyan(text) - Cyan background
  • ctr.bgWhite(text) - White background
  • ctr.bgBlack(text) - Black background

Gradient Methods

  • ctr.gradient(text, colors) - Custom gradient with array of colors
  • ctr.rainbow(text) - Rainbow gradient
  • ctr.sunset(text) - Sunset gradient (orange to pink)
  • ctr.morning(text) - Morning gradient (light green to pink)

Styled Messages

  • ctr.success(text) - Green checkmark with text
  • ctr.error(text) - Red X with text
  • ctr.info(text) - Blue info icon with text
  • ctr.warn(text) - Yellow warning icon with text

Advanced Colors

  • ctr.hex(color, text) - Custom hex color
  • ctr.rgb(r, g, b, text) - Custom RGB color
  • ctr.hsl(h, s, l, text) - Custom HSL color

Chaining (Future Feature)

  • ctr.chain() - Returns chainable instance for combining styles

🏗️ CLI Tool Example

#!/usr/bin/env node
const ctr = require("aschalk");

console.log(ctr.gradient("My Awesome CLI Tool", ["#667eea", "#764ba2"]));
console.log("");

console.log(ctr.success("Connected to database"));
console.log(ctr.info("Processing 1,234 records"));
console.log(ctr.warn("Rate limit approaching"));
console.log(ctr.error("Failed to upload file"));

console.log("");
console.log(ctr.rainbow("Thanks for using our tool!"));

🚀 Try It Out

Run the included demo to see all features:

npm install aschalk
node node_modules/aschalk/examples/demo.js

📦 Package Info

🤝 Contributing

This package was created by Relmzey (Nexta Development).

Feel free to report issues or suggest improvements!

📄 License

MIT License - feel free to use in your projects!


Made with ❤️ by Relmzey (Nexta Development)