The ansi module provides color detection, writing ansi, codes, and an ansi writer.
bearz.io
bearz-io/js-ansi