@nevware21/chromacon
Text formatting utilities to colorize your text output.

Overview
Chromacon is a powerful, TypeScript/JavaScript library for adding colors and text formatting to your console and terminal output. Built with modern development practices, it provides a comprehensive API for creating rich, colorful text output across different environments and color support levels.
Key Features
- Rich Color Support - Basic 16 colors, 256-color palette, and true color (24-bit RGB)
- Text Styling - Bold, italic, underline, strikethrough, and more
- Smart Color Restoration - Automatic color context restoration when nesting color functions
- Output Optimization - Intelligent removal of redundant ANSI escape sequences for cleaner output
- Theming System - Built-in theme support with multiple themes in upcoming releases
- Automatic Detection - Intelligent color support detection for different environments
- Type Safety - Full TypeScript support with comprehensive type definitions
- Cross-Platform - Works in Node.js, browsers, and web workers
- Minimal Dependencies - Lightweight with only essential utilities
- Flexible API - Both functional and string-based usage patterns
API Reference
Quick Example
import { red, green, blue, bold, underline, bgYellow } from "@nevware21/chromacon";
// Basic usage
console.log(red("Error: Something went wrong"));
console.log(green("Success: Operation completed"));
console.log(bold("Important message"));
// Combine colors and styles
console.log(bold(red("Critical Alert")));
console.log(bgYellow(blue("Blue text on yellow background")));
Installation
npm install @nevware21/chromacon
Resources
Quick Links