It can happen on macOS that the terminal doesn't report the "colors"
capability in the terminfo database, in which case tigetnum returns -1.
This doesn't mean however that the terminal doesn't supports color, it
just means that the capability is absent from the terminal description.
In that case, we should still fallback to the checking the $TERM
environment variable to see if it supports ANSI escapes codes.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>