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

coloring-console

v1.0.22

Published

Uma biblioteca para colorir textos no console usando TypeScript e POO.

Downloads

55

Readme

🎨 coloring-console

A lightweight and elegant TypeScript library to customize and colorize terminal output using clean Object-Oriented Programming (OOP).

Perfect for:

✅ Visual logs
✅ CLI tools
✅ Clean code architecture
✅ Eye-catching terminal UIs


🚀 Installation

npm install coloring-console

✨ Why use it? ✅ Written in TypeScript with OOP principles

🧱 Based on the Builder Pattern for flexibility

🌈 Supports text color, background color, and text attributes

💡 Great as an educational example of clean, modular architecture

🧪 Usage Example

import { coloring , theme } from "coloring-console";

console.log(coloring.create(
  {
    color: "blue",
    background: "bg-yellow",
    attrs: ["bold"]
  },
  "Stylish output in your terminal",
  true
));

🎯 Text Colors

"default" | "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "light-gray" | "light-red" | "light-green" | "light-yellow" | "light-blue" | "light-magenta" | "light-cyan" | "light-white"

🎨 Background Colors

"bg-black" | "bg-red" | "bg-green" | "bg-yellow" | "bg-blue" | "bg-magenta" | "bg-cyan" | "bg-white" | "bg-light-gray" | "bg-light-red" | "bg-light-green" | "bg-light-yellow" | "bg-light-blue" | "bg-light-magenta" | "bg-light-cyan" | "bg-light-white"

💡 Text Attributes

"bold" | "underline" | "blink"

🧩 Custom Themes (News)

Create named themes with reusable color, background, and attributes:

⚠️ Themes created with addTheme are stored in memory in the current Node.js runtime. This means that they will work correctly in applications such as Express, Next.js, NestJS, and others, as long as they are within the same process.

However, environments where each execution is isolated (such as standalone CLI scripts, workers, jobs, or serverless functions) do not share the same runtime. In these cases, the themes created will not be persisted between executions.

For these scenarios, it is recommended to recreate the themes dynamically or implement a persistence layer (such as a configuration file or database).

coloring.addTheme("error", {
  color: "light-white",
  background: "bg-red",
  attrs: "bold"
});

console.log(theme.applyTheme('error', 'New error theme test', true));

/*⚠️ to delete a theme created in the global state*/
/*⚠️ Be careful when using the deleteTheme method as it deletes the theme from the global state of the application and may cause errors in logs already written.*/

theme.deleteTheme("error");

/*⚠️ deleteTheme is a subterfuge for cleaning up an unwanted theme, it should not remain in your node runtime*/

⚠️ deleteTheme(name) remove the theme from the global instance. If other modules expect this theme, make sure to coordinate their usage well.

🤝 Contributing

PRs, issues and suggestions are welcome! Let’s build the most elegant terminal logs together. 🌟

📄 License

ISC © Romilson de Jesus Cavalcante

⭐️ Found it useful? Don’t forget to star this repo on GitHub and share it with your dev friends!

access repository

--> https://github.com/romilsondev1/Coloring-console