New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

paint-terminal

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paint-terminal

It gives color to console & terminal to print txt.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

🎨 paint-terminal

A lightweight Node.js utility for printing colored, styled terminal output using ANSI escape codes. Works with CommonJS and ESM formats.

✨ Features

  • ✅ Easy terminal logging with colors and backgrounds
  • ✅ ANSI escape code support
  • ✅ Supports both require and import
  • ✅ Useful for CLI tools, logs, and debugging

📦 Installation

npm install paint-terminal

🚀 Usage

✅ ES Module (ESM)

🧪 Example: terminal_log with Color, Background, and Style

You can pass a text color, background color, and an optional text style to terminal_log.

import { terminal_log } from "paint-terminal";

// Green text, black background, bold style
terminal_log("✅ Task Completed", "green", "black", "bold");

// Yellow text with red background and underline
terminal_log("⚠ Warning!", "yellow", "red", "underline");

// Cyan text with no background, italic style
terminal_log("ℹ Info Message", "cyan", undefined, "italic");

// Bright white text with magenta background and inverse style
terminal_log("🚫 Access Denied", "brightWhite", "magenta", "inverse");

✅ Common JS (CJS)

const { terminal_log } = require("paint-terminal");

terminal_log("Error occurred!", "red", "white");
terminal_log("Info message", "blue");
terminal_log("Debug", "gray", "black");

🎨 Color Reference

You can use any of the following color names for color (text) and background:

🎨 Supported Keys

This package supports the following values for text color, background color, and styles.

Text ColorsBackground ColorsStyles
blackblackreset
redredbold
greengreendim
yellowyellowitalic
blueblueunderline
magentamagentainverse
cyancyanhidden
whitewhitestrikethrough
gray / greygray / grey
brightRedbrightRed
brightGreenbrightGreen
brightYellowbrightYellow
brightBluebrightBlue
brightMagentabrightMagenta
brightCyanbrightCyan
brightWhitebrightWhite

✅ Usage Example (in Browser or Frontend Project)

import { console_log } from "./console";

// Basic colored log
console_log("Hello World!", "blue");

// Colored text with background
console_log("Success!", "white", "green");

// Red text with yellow background
console_log("Warning!", "red", "yellow");

FAQs

Package last updated on 08 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts