E-Ink News Daily

Back to list

FORCE_COLOR: Keep Your Command Line Colorful, Even when Piping - Retain Text Colors in Logs, Output Streams, and More

An informal standard has been proposed to introduce a FORCE_COLOR environment variable that allows users to force ANSI color output in command-line programs, even when output is piped. The standard complements the existing NO_COLOR variable by providing a consistent cross-tool method to retain colored text in logs and output streams.

Background

The NO_COLOR environment variable (recognized by many CLI tools since 2018) disables colored output. This new FORCE_COLOR proposal addresses the gap by providing a symmetric way to force color on, especially useful when piping through tools like less, grep, or tee which typically strip ANSI codes.

Source
Lobsters
Published
Sep 4, 2026 at 08:37 PM
Score
6.0 / 10