Skip to content

Support for NO_COLOR proposal #1498

Description

@seebi

Expected Behavior

As described at https://no-color.org/, setting NO_COLOR to any value should disable color output at all.

Actual Behavior

Every application need its own solution for color disabling.

I think this behavior should be added to Click itself because its a reasonable default.

Activity

  1. jcrotts commented on Mar 20, 2020

    @jcrotts
    Contributor

    See this issue for discussion on a similar request.
    This may have more of a rationale behind it, but in general I don't think click benefits from this sort of customization.

  2. davidism commented on Apr 13, 2020

    @davidism
    Member

    I find myself agreeing with ggreer/the_silver_searcher#1207 (comment), which is linked from the page you linked. It's not clear that this standard is a standard or that it's the correct thing to do.

    As Jay points out, this has already been discussed in #1090 and we reached similar conclusions then. If an application wants to support controlling the color with an env var, it's straightforward to add.

    if __name__ == "__main__":
        color = os.environ.get("CLICK_COLOR")
        color = color in {"1", "true"} if color is not None else None
        cli(color=color)
  3. locked as resolved and limited conversation to collaborators on Nov 13, 2020
  4. changed the title [-]Support for NO_COLOR proposal[/-] [+]Support for `NO_COLOR` proposal[/+] on Aug 3, 2025
  5. added
    help outputHelp text formatting, layout, and --help rendering
    on Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help outputHelp text formatting, layout, and --help rendering

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions