Static
applyApply an array of colors/styles to text
The text to format
Array of color names to apply
Whether to use colors (defaults to true)
Text with all styles applied
Static
applyApply colors from a preset style
The text to format
The preset style name
Whether to use colors (defaults to true)
Formatted text with preset colors applied
Static
blueStatic
boldStatic
brightStatic
brightStatic
brightStatic
brightStatic
brightStatic
brightStatic
brightStatic
clearStatic
colorApply a single color or style to text
The text to colorize
The color or style name to apply
Whether to use colors (defaults to true)
Formatted text with color codes
Static
colorApply multiple colors to different parts of a string
Array of objects containing text and color information
Whether to use colors (defaults to true)
Combined string with each part colored accordingly
Static
createStatic
cyanStatic
dimStatic
formatFormat a key-value pair with colored key
The key to display
The value to display
Color for the key
Whether to use colors (defaults to true)
Formatted string like "key: value"
Static
getStatic
grayStatic
greenStatic
hasStatic
highlightHighlight specific matches in text with a given color
The source text
RegExp or string to match
Color to apply to matches
Whether to use colors (defaults to true)
Text with highlighted matches
Static
inverseStatic
isUtility: Check if a string looks like a URL or file path.
The text to check.
True if it is link-like.
Static
italicStatic
magentaStatic
rainbowCreate a rainbow effect on text (each character gets a different color)
The text to rainbow-ify
Whether to use colors (defaults to true)
Text with rainbow coloring
Static
redStatic
setStatic
strikethroughStatic
stripStatic
supportsStatic
underlineStatic
visibleStatic
whiteStatic
yellow
Static utility class for applying ANSI color codes.
This class provides low-level color application functionality used by other components. It handles:
Colorizer