Choose whether to use color based on the command argument.

    Args:
        setting - Either `auto`, `always`, or `never`

def use_color(setting):
    """Choose whether to use color based on the command argument.

    Args:
        setting - Either `auto`, `always`, or `never`
    """
    if setting not in COLOR_CHOICES:
        raise InvalidColorSetting(setting)

    return (
        setting == 'always' or
        (setting == 'auto' and sys.stdout.isatty() and terminal_supports_color)
    )