Color is an enhancement, never information.
Divergent
Anything conveyed by color must also be carried by a word or a symbol. Color is a courtesy one reader can accept, and gibberish to everything else.
Human
A person watching a terminal absorbs a red error faster than the word "error." Take the gift.
Agent
A pipe, a log aggregator, and a screen reader all strip or mangle the codes. If the color carried the meaning, the meaning is gone.
So decorate, never encode. Turn it off when stdout isn't a terminal, when NO_COLOR is set, and when --no-color is passed.
prod-1 us-east-1 3/3 nodes # green only: status disappears in a pipe
prod-2 us-east-1 2/3 nodes # red only: looks identical to prod-1 without ANSI
✓ healthy prod-1 us-east-1 3/3 nodes
✗ degraded prod-2 us-east-1 2/3 nodes (node-3 unreachable)