The tiniest and the fastest library for terminal output formatting with ANSI colors
89
Factory pattern for zero-overhead color disabling
Uses createColors function
0%
100%
Passes colorEnabled configuration
0%
100%
Uses red function
0%
100%
Uses green function
0%
100%
Uses yellow function
0%
100%
Uses cyan function
0%
100%
Background colors (bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite)
bgRed usage
100%
100%
bgGreen usage
100%
100%
bgYellow usage
100%
100%
bgCyan usage
100%
100%
Import statement
100%
100%
No background fallback
100%
100%
Basic foreground colors (black, red, green, yellow, blue, magenta, cyan, white, gray)
Import picocolors
100%
100%
Use red() function
100%
100%
Use yellow() function
100%
100%
Use green() function
100%
100%
Use cyan() function
100%
100%
Use magenta() function
100%
100%
Use gray() function
100%
100%
Use black() function
100%
100%
Use white() function
100%
100%
Manual color control with createColors(enabled) function
Uses createColors function
100%
100%
Passes config to createColors
100%
100%
Uses cyan color
100%
100%
Uses yellow color
100%
100%
Uses red color
100%
100%
No automatic detection
100%
100%
Non-string input handling (numbers, booleans, null, undefined)
Direct number formatting
0%
0%
Direct boolean formatting
0%
0%
Direct null formatting
0%
0%
Direct undefined formatting
0%
0%
Type-based color selection
100%
100%
Label formatting
100%
100%
Timestamp formatting
100%
100%
Edge case handling
40%
0%
Platform-specific detection (Windows, Unix/Linux TTY)
Uses isColorSupported
100%
80%
Uses createColors() correctly
100%
100%
Disables colors for files
50%
50%
Uses color functions
100%
100%
Proper API selection
100%
100%
Bright foreground color variants (blackBright, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright)
redBright usage
0%
100%
yellowBright usage
0%
100%
greenBright usage
0%
100%
Standard color contrast
100%
100%
Defensive programming for missing process object
Uses picocolors import
100%
100%
Uses isColorSupported property
0%
100%
Implements defensive checks
100%
100%
Uses color formatter
100%
100%
Conditional formatting
100%
100%
Handles edge cases
100%
100%
Close sequence replacement algorithm for proper nesting
Basic color usage
100%
100%
Bright color variants
0%
100%
Bold text formatting
100%
100%
Underline text formatting
100%
100%
Nested color composition
53%
20%
Nested format composition
100%
66%
Multiple nesting levels
100%
20%
Environment variable support (NO_COLOR, FORCE_COLOR, CI, TERM)
isColorSupported usage
0%
100%
createColors() function
0%
100%
Color functions
50%
100%
Environment variable handling
0%
100%
Package import
100%
100%
Install with Tessl CLI
npx tessl i tessl/npm-picocolors