Back to Explore

alexeyraspopov/picocolors

GitHub
2 watchersOpen source

Last release:

picocolors is a small, dependency-free JavaScript library for formatting terminal output with ANSI colors. It provides functions for foreground colors, background colors, and text styles (for example bold, italic, underline), and includes helpers like NO_COLOR support and a flag to check whether colors are supported.

Project status

  • Maintenance status: GitHub-source activity appears quiet or maintenance mode, with the latest upstream push on 2024-11-18 and the most recent tagged update v1.1.1 on 2024-10-16, which is well over a year ago relative to 2026-06-09.
  • Update cadence: Updates were clustered in 2024 (v1.1.0 on 2024-09-02, v1.1.1 on 2024-10-16), but there has been no evidence of further updates since late 2024.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.1.1

    picocolors v1.1.1 primarily updates how it determines whether ANSI colors are supported, specifically around empty-string handling for NO_COLOR and FORCE_COLOR. It also ships TypeScript declarations as picocolors.d.ts (from types.ts). Additionally, the implementation was refactored to avoid calling require().

  • v1.1.0

    picocolors v1.1.0 adds new bright color variants for both foreground and background styling. The new APIs expose additional formatting functions (for example, blackBright and bgRedBright) and update the browser build and TypeScript typings to include them.

    Features
  • v1.0.1

    picocolors v1.0.1 updates its color support detection to work correctly in Vercel Edge Runtime-like environments, where `tty` and/or `require` may not be available. It also removes recursive logic used for replacing nested ANSI closing codes to avoid potential stack overflows on very long inputs.

  • v1.0.0

    picocolors v1.0.0 focuses on reducing package size by refactoring implementation details, plus a small TypeScript typings correction. The runtime API remains the same shape (the default exported colors object and the createColors() factory), with the main functional change being that createColors typing now matches the existing default parameter behavior.

  • v0.2.1

    picocolors v0.2.1 primarily focuses on reducing package size by removing semicolons and improving TypeScript type definitions. It also updates `createColors()` so that when no enabled flag is provided, it uses the module's `isColorSupported` detection logic.

  • v0.2.0

    picocolors v0.2.0 primarily changes how the package is published and imported (ESM support removed), and it adds support for non-string inputs. The implementation was refactored to build a color formatter object via a createColors factory and to coerce inputs to strings.

    BreakingFeatures
  • v0.1.0

    picocolors v0.1.0 adds broader runtime support, including CommonJS, newer Node.js versions (Node.js 6+), and browser usage. This release focuses on enabling the library across multiple module systems and environments.

    Features