{"action":"created","comment":{"url":"https://api.github.com/repos/chalk/ansi-styles/pulls/comments/47730754","id":47730754,"diff_hunk":"@@ -57,6 +80,49 @@ function assembleStyles() {\n \t\t});\n \t});\n \n+\tfunction rgb2rgb(r, g, b) {\n+\t\treturn [r, g, b];\n+\t}\n+\n+\tstyles.color.close = '\\u001b[39m';\n+\tstyles.bgColor.close = '\\u001b[49m';\n+\n+\tstyles.color.ansi = {};\n+\tstyles.color.ansi256 = {};\n+\tstyles.color.ansi16m = {\n+\t\trgb: wrapAnsi16m(rgb2rgb, 0)\n+\t};\n+\n+\tstyles.bgColor.ansi = {};\n+\tstyles.bgColor.ansi256 = {};\n+\tstyles.bgColor.ansi16m = {\n+\t\trgb: wrapAnsi16m(rgb2rgb, 10)\n+\t};\n+\n+\tfor (var key in colorConvert) {\n+\t\tif (!colorConvert.hasOwnProperty(key)) {\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tvar fn = colorConvert[key];\n+\t\tvar conversion = key.replace(/^([^2]+).+$/, '$1');\n+\t\tif (/2ansi16$/.test(key)) {\n+\t\t\tstyles.color.ansi[conversion] = wrapAnsi16(fn, 0);\n+\t\t\tstyles.bgColor.ansi[conversion] = wrapAnsi16(fn, 10);\n+\t\t\tcontinue;\n+\t\t}","path":"index.js","position":89,"original_position":89,"commit_id":"ec8b3387d55229d52381745dbaaff63b6fffe66e","original_commit_id":"ec8b3387d55229d52381745dbaaff63b6fffe66e","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"body":"empty line below here","created_at":"2015-12-16T02:40:41Z","updated_at":"2015-12-16T02:40:41Z","html_url":"https://github.com/chalk/ansi-styles/pull/13#discussion_r47730754","pull_request_url":"https://api.github.com/repos/chalk/ansi-styles/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/chalk/ansi-styles/pulls/comments/47730754"},"html":{"href":"https://github.com/chalk/ansi-styles/pull/13#discussion_r47730754"},"pull_request":{"href":"https://api.github.com/repos/chalk/ansi-styles/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/chalk/ansi-styles/pulls/13","id":40829580,"html_url":"https://github.com/chalk/ansi-styles/pull/13","diff_url":"https://github.com/chalk/ansi-styles/pull/13.diff","patch_url":"https://github.com/chalk/ansi-styles/pull/13.patch","issue_url":"https://api.github.com/repos/chalk/ansi-styles/issues/13","number":13,"state":"open","locked":false,"title":"added 256/16m color support","user":{"login":"Qix-","id":885648,"avatar_url":"https://avatars.githubusercontent.com/u/885648?v=3","gravatar_id":"","url":"https://api.github.com/users/Qix-","html_url":"https://github.com/Qix-","followers_url":"https://api.github.com/users/Qix-/followers","following_url":"https://api.github.com/users/Qix-/following{/other_user}","gists_url":"https://api.github.com/users/Qix-/gists{/gist_id}","starred_url":"https://api.github.com/users/Qix-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qix-/subscriptions","organizations_url":"https://api.github.com/users/Qix-/orgs","repos_url":"https://api.github.com/users/Qix-/repos","events_url":"https://api.github.com/users/Qix-/events{/privacy}","received_events_url":"https://api.github.com/users/Qix-/received_events","type":"User","site_admin":false},"body":"In reference to #11.\r\n\r\nHere it is. It adds two new properties, `color` and `bgColor`. Both properties each have three properties, `ansi16`, `ansi256`, and `ansi16m`. These properties each expose all of the [ANSI conversions available from `color-convert`](https://github.com/harthur/color-convert/blob/master/conversions.js#L69-L81).\r\n\r\nTests are inbound (waiting on high-level feedback).","created_at":"2015-07-25T02:35:35Z","updated_at":"2015-12-16T02:40:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d537433478202b7211803fbbd714265dca3088d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chalk/ansi-styles/pulls/13/commits","review_comments_url":"https://api.github.com/repos/chalk/ansi-styles/pulls/13/comments","review_comment_url":"https://api.github.com/repos/chalk/ansi-styles/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chalk/ansi-styles/issues/13/comments","statuses_url":"https://api.github.com/repos/chalk/ansi-styles/statuses/ec8b3387d55229d52381745dbaaff63b6fffe66e","head":{"label":"chalk:256color","ref":"256color","sha":"ec8b3387d55229d52381745dbaaff63b6fffe66e","user":{"login":"chalk","id":13122722,"avatar_url":"https://avatars.githubusercontent.com/u/13122722?v=3","gravatar_id":"","url":"https://api.github.com/users/chalk","html_url":"https://github.com/chalk","followers_url":"https://api.github.com/users/chalk/followers","following_url":"https://api.github.com/users/chalk/following{/other_user}","gists_url":"https://api.github.com/users/chalk/gists{/gist_id}","starred_url":"https://api.github.com/users/chalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalk/subscriptions","organizations_url":"https://api.github.com/users/chalk/orgs","repos_url":"https://api.github.com/users/chalk/repos","events_url":"https://api.github.com/users/chalk/events{/privacy}","received_events_url":"https://api.github.com/users/chalk/received_events","type":"Organization","site_admin":false},"repo":{"id":11803168,"name":"ansi-styles","full_name":"chalk/ansi-styles","owner":{"login":"chalk","id":13122722,"avatar_url":"https://avatars.githubusercontent.com/u/13122722?v=3","gravatar_id":"","url":"https://api.github.com/users/chalk","html_url":"https://github.com/chalk","followers_url":"https://api.github.com/users/chalk/followers","following_url":"https://api.github.com/users/chalk/following{/other_user}","gists_url":"https://api.github.com/users/chalk/gists{/gist_id}","starred_url":"https://api.github.com/users/chalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalk/subscriptions","organizations_url":"https://api.github.com/users/chalk/orgs","repos_url":"https://api.github.com/users/chalk/repos","events_url":"https://api.github.com/users/chalk/events{/privacy}","received_events_url":"https://api.github.com/users/chalk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chalk/ansi-styles","description":"ANSI escape codes for styling strings in the terminal","fork":false,"url":"https://api.github.com/repos/chalk/ansi-styles","forks_url":"https://api.github.com/repos/chalk/ansi-styles/forks","keys_url":"https://api.github.com/repos/chalk/ansi-styles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chalk/ansi-styles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chalk/ansi-styles/teams","hooks_url":"https://api.github.com/repos/chalk/ansi-styles/hooks","issue_events_url":"https://api.github.com/repos/chalk/ansi-styles/issues/events{/number}","events_url":"https://api.github.com/repos/chalk/ansi-styles/events","assignees_url":"https://api.github.com/repos/chalk/ansi-styles/assignees{/user}","branches_url":"https://api.github.com/repos/chalk/ansi-styles/branches{/branch}","tags_url":"https://api.github.com/repos/chalk/ansi-styles/tags","blobs_url":"https://api.github.com/repos/chalk/ansi-styles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chalk/ansi-styles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chalk/ansi-styles/git/refs{/sha}","trees_url":"https://api.github.com/repos/chalk/ansi-styles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chalk/ansi-styles/statuses/{sha}","languages_url":"https://api.github.com/repos/chalk/ansi-styles/languages","stargazers_url":"https://api.github.com/repos/chalk/ansi-styles/stargazers","contributors_url":"https://api.github.com/repos/chalk/ansi-styles/contributors","subscribers_url":"https://api.github.com/repos/chalk/ansi-styles/subscribers","subscription_url":"https://api.github.com/repos/chalk/ansi-styles/subscription","commits_url":"https://api.github.com/repos/chalk/ansi-styles/commits{/sha}","git_commits_url":"https://api.github.com/repos/chalk/ansi-styles/git/commits{/sha}","comments_url":"https://api.github.com/repos/chalk/ansi-styles/comments{/number}","issue_comment_url":"https://api.github.com/repos/chalk/ansi-styles/issues/comments{/number}","contents_url":"https://api.github.com/repos/chalk/ansi-styles/contents/{+path}","compare_url":"https://api.github.com/repos/chalk/ansi-styles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chalk/ansi-styles/merges","archive_url":"https://api.github.com/repos/chalk/ansi-styles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chalk/ansi-styles/downloads","issues_url":"https://api.github.com/repos/chalk/ansi-styles/issues{/number}","pulls_url":"https://api.github.com/repos/chalk/ansi-styles/pulls{/number}","milestones_url":"https://api.github.com/repos/chalk/ansi-styles/milestones{/number}","notifications_url":"https://api.github.com/repos/chalk/ansi-styles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chalk/ansi-styles/labels{/name}","releases_url":"https://api.github.com/repos/chalk/ansi-styles/releases{/id}","created_at":"2013-07-31T22:56:59Z","updated_at":"2015-12-04T08:48:43Z","pushed_at":"2015-12-13T21:50:32Z","git_url":"git://github.com/chalk/ansi-styles.git","ssh_url":"git@github.com:chalk/ansi-styles.git","clone_url":"https://github.com/chalk/ansi-styles.git","svn_url":"https://github.com/chalk/ansi-styles","homepage":"","size":142,"stargazers_count":81,"watchers_count":81,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":81,"default_branch":"master"}},"base":{"label":"chalk:master","ref":"master","sha":"b5cc0cd6d6333458a366c44d0eb5a72c585c5775","user":{"login":"chalk","id":13122722,"avatar_url":"https://avatars.githubusercontent.com/u/13122722?v=3","gravatar_id":"","url":"https://api.github.com/users/chalk","html_url":"https://github.com/chalk","followers_url":"https://api.github.com/users/chalk/followers","following_url":"https://api.github.com/users/chalk/following{/other_user}","gists_url":"https://api.github.com/users/chalk/gists{/gist_id}","starred_url":"https://api.github.com/users/chalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalk/subscriptions","organizations_url":"https://api.github.com/users/chalk/orgs","repos_url":"https://api.github.com/users/chalk/repos","events_url":"https://api.github.com/users/chalk/events{/privacy}","received_events_url":"https://api.github.com/users/chalk/received_events","type":"Organization","site_admin":false},"repo":{"id":11803168,"name":"ansi-styles","full_name":"chalk/ansi-styles","owner":{"login":"chalk","id":13122722,"avatar_url":"https://avatars.githubusercontent.com/u/13122722?v=3","gravatar_id":"","url":"https://api.github.com/users/chalk","html_url":"https://github.com/chalk","followers_url":"https://api.github.com/users/chalk/followers","following_url":"https://api.github.com/users/chalk/following{/other_user}","gists_url":"https://api.github.com/users/chalk/gists{/gist_id}","starred_url":"https://api.github.com/users/chalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalk/subscriptions","organizations_url":"https://api.github.com/users/chalk/orgs","repos_url":"https://api.github.com/users/chalk/repos","events_url":"https://api.github.com/users/chalk/events{/privacy}","received_events_url":"https://api.github.com/users/chalk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chalk/ansi-styles","description":"ANSI escape codes for styling strings in the terminal","fork":false,"url":"https://api.github.com/repos/chalk/ansi-styles","forks_url":"https://api.github.com/repos/chalk/ansi-styles/forks","keys_url":"https://api.github.com/repos/chalk/ansi-styles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chalk/ansi-styles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chalk/ansi-styles/teams","hooks_url":"https://api.github.com/repos/chalk/ansi-styles/hooks","issue_events_url":"https://api.github.com/repos/chalk/ansi-styles/issues/events{/number}","events_url":"https://api.github.com/repos/chalk/ansi-styles/events","assignees_url":"https://api.github.com/repos/chalk/ansi-styles/assignees{/user}","branches_url":"https://api.github.com/repos/chalk/ansi-styles/branches{/branch}","tags_url":"https://api.github.com/repos/chalk/ansi-styles/tags","blobs_url":"https://api.github.com/repos/chalk/ansi-styles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chalk/ansi-styles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chalk/ansi-styles/git/refs{/sha}","trees_url":"https://api.github.com/repos/chalk/ansi-styles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chalk/ansi-styles/statuses/{sha}","languages_url":"https://api.github.com/repos/chalk/ansi-styles/languages","stargazers_url":"https://api.github.com/repos/chalk/ansi-styles/stargazers","contributors_url":"https://api.github.com/repos/chalk/ansi-styles/contributors","subscribers_url":"https://api.github.com/repos/chalk/ansi-styles/subscribers","subscription_url":"https://api.github.com/repos/chalk/ansi-styles/subscription","commits_url":"https://api.github.com/repos/chalk/ansi-styles/commits{/sha}","git_commits_url":"https://api.github.com/repos/chalk/ansi-styles/git/commits{/sha}","comments_url":"https://api.github.com/repos/chalk/ansi-styles/comments{/number}","issue_comment_url":"https://api.github.com/repos/chalk/ansi-styles/issues/comments{/number}","contents_url":"https://api.github.com/repos/chalk/ansi-styles/contents/{+path}","compare_url":"https://api.github.com/repos/chalk/ansi-styles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chalk/ansi-styles/merges","archive_url":"https://api.github.com/repos/chalk/ansi-styles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chalk/ansi-styles/downloads","issues_url":"https://api.github.com/repos/chalk/ansi-styles/issues{/number}","pulls_url":"https://api.github.com/repos/chalk/ansi-styles/pulls{/number}","milestones_url":"https://api.github.com/repos/chalk/ansi-styles/milestones{/number}","notifications_url":"https://api.github.com/repos/chalk/ansi-styles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chalk/ansi-styles/labels{/name}","releases_url":"https://api.github.com/repos/chalk/ansi-styles/releases{/id}","created_at":"2013-07-31T22:56:59Z","updated_at":"2015-12-04T08:48:43Z","pushed_at":"2015-12-13T21:50:32Z","git_url":"git://github.com/chalk/ansi-styles.git","ssh_url":"git@github.com:chalk/ansi-styles.git","clone_url":"https://github.com/chalk/ansi-styles.git","svn_url":"https://github.com/chalk/ansi-styles","homepage":"","size":142,"stargazers_count":81,"watchers_count":81,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chalk/ansi-styles/pulls/13"},"html":{"href":"https://github.com/chalk/ansi-styles/pull/13"},"issue":{"href":"https://api.github.com/repos/chalk/ansi-styles/issues/13"},"comments":{"href":"https://api.github.com/repos/chalk/ansi-styles/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/chalk/ansi-styles/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/chalk/ansi-styles/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chalk/ansi-styles/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/chalk/ansi-styles/statuses/ec8b3387d55229d52381745dbaaff63b6fffe66e"}}}}