{"action":"created","issue":{"url":"https://api.github.com/repos/fatih/color/issues/19","labels_url":"https://api.github.com/repos/fatih/color/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/fatih/color/issues/19/comments","events_url":"https://api.github.com/repos/fatih/color/issues/19/events","html_url":"https://github.com/fatih/color/pull/19","id":96935723,"number":19,"title":"color: only show color in stdout","user":{"login":"zddhub","id":6077698,"avatar_url":"https://avatars.githubusercontent.com/u/6077698?v=3","gravatar_id":"","url":"https://api.github.com/users/zddhub","html_url":"https://github.com/zddhub","followers_url":"https://api.github.com/users/zddhub/followers","following_url":"https://api.github.com/users/zddhub/following{/other_user}","gists_url":"https://api.github.com/users/zddhub/gists{/gist_id}","starred_url":"https://api.github.com/users/zddhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zddhub/subscriptions","organizations_url":"https://api.github.com/users/zddhub/orgs","repos_url":"https://api.github.com/users/zddhub/repos","events_url":"https://api.github.com/users/zddhub/events{/privacy}","received_events_url":"https://api.github.com/users/zddhub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T00:45:28Z","updated_at":"2015-07-24T07:34:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fatih/color/pulls/19","html_url":"https://github.com/fatih/color/pull/19","diff_url":"https://github.com/fatih/color/pull/19.diff","patch_url":"https://github.com/fatih/color/pull/19.patch"},"body":"I find a solution to close https://github.com/fatih/color/issues/18. Do you agree?"},"comment":{"url":"https://api.github.com/repos/fatih/color/issues/comments/124390706","html_url":"https://github.com/fatih/color/pull/19#issuecomment-124390706","issue_url":"https://api.github.com/repos/fatih/color/issues/19","id":124390706,"user":{"login":"fatih","id":438920,"avatar_url":"https://avatars.githubusercontent.com/u/438920?v=3","gravatar_id":"","url":"https://api.github.com/users/fatih","html_url":"https://github.com/fatih","followers_url":"https://api.github.com/users/fatih/followers","following_url":"https://api.github.com/users/fatih/following{/other_user}","gists_url":"https://api.github.com/users/fatih/gists{/gist_id}","starred_url":"https://api.github.com/users/fatih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatih/subscriptions","organizations_url":"https://api.github.com/users/fatih/orgs","repos_url":"https://api.github.com/users/fatih/repos","events_url":"https://api.github.com/users/fatih/events{/privacy}","received_events_url":"https://api.github.com/users/fatih/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T07:34:52Z","updated_at":"2015-07-24T07:34:52Z","body":"That would work, tough please use https://github.com/mattn/go-isatty because it has Windows support too:\r\n\r\n```\r\nvar NoColor = !isatty.IsTerminal(os.Stdout.Fd())\r\n```\r\n\r\nAlso please change the doc to point that it changes dynamically:\r\n\r\n```\r\n// NoColor defines if the output is colorized or not. It's dynamically set to\r\n// false or true based on the stdout's file descriptor referring to a terminal\r\n// or not. This is a global option and affects all colors. For more control\r\n// over each color block use the methods DisableColor() individually.\r\n```\r\n"}}