Back to Explore

alexeyraspopov/picocolors

GitHub
1 watchersOpen source

Last release: 10/16/2024

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

  • Actively maintained and evolving, with new updates appearing through 2024 (last upstream push 2024-11-18, plus prior updates v1.1.1, v1.1.0, v1.0.1).
  • Apparent update cadence: roughly every 1 to 3 months in 2024, with updates on 2024-09-02 (v1.1.0), 2024-10-16 (v1.1.1), and earlier 2024-05-14 (v1.0.1).

AI summary generated Today

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

Recent updates

  • v1.1.1

    10/16/2024

    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

    9/2/2024

    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

    5/14/2024

    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.