contrast-color
Determines the best contrast color to use. Give it a background color and it returns a foreground color (black or white by default but customizable).
ansi-styles
ANSI escape codes for styling strings in the terminal
chalk
Terminal string styling done right
ansi-regex
Regular expression for matching ANSI escape codes