{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/32831254","id":32831254,"diff_hunk":"@@ -0,0 +1,852 @@\n+module std.experimental.color.rgb;\n+\n+import std.experimental.color;\n+import std.experimental.color.xyz;\n+\n+import std.traits: isInstanceOf, isNumeric, isIntegral, isFloatingPoint, isSigned, isSomeChar, Unqual;\n+import std.typetuple: TypeTuple;\n+import std.typecons: tuple;\n+\n+@safe: pure: nothrow: @nogc:\n+\n+\n+enum isRGB(T) = isInstanceOf!(RGB, T);\n+\n+enum RGBColorSpace\n+{\n+    sRGB,\n+    sRGB_Gamma2_2,\n+/+ TODO: these all need testing\n+    AdobeRGB,\n+    AppleRGB,\n+    BestRGB,\n+    BetaRGB,\n+    BruceRGB,\n+    CIE_RGB,\n+    ColorMatchRGB,\n+    DonRGB4,\n+//    ECI_RGB_v2,\n+    EktaSpacePS5,\n+    NTSC_RGB,\n+    PAL_SECAM_RGB,\n+    ProPhotoRGB,\n+    SMPTE_C_RGB,\n+    WideGamutRGB\n++/\n+}\n+\n+\n+struct RGB(string components_, ComponentType_, bool linear_ = false, RGBColorSpace colorSpace_ = RGBColorSpace.sRGB) if(isValidComponentType!ComponentType_)","path":"std/experimental/color/rgb.d","position":39,"original_position":39,"commit_id":"770a722d3b67b79399c47685269ac287c2dc5c58","original_commit_id":"770a722d3b67b79399c47685269ac287c2dc5c58","user":{"login":"CyberShadow","id":160894,"avatar_url":"https://avatars.githubusercontent.com/u/160894?v=3","gravatar_id":"","url":"https://api.github.com/users/CyberShadow","html_url":"https://github.com/CyberShadow","followers_url":"https://api.github.com/users/CyberShadow/followers","following_url":"https://api.github.com/users/CyberShadow/following{/other_user}","gists_url":"https://api.github.com/users/CyberShadow/gists{/gist_id}","starred_url":"https://api.github.com/users/CyberShadow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyberShadow/subscriptions","organizations_url":"https://api.github.com/users/CyberShadow/orgs","repos_url":"https://api.github.com/users/CyberShadow/repos","events_url":"https://api.github.com/users/CyberShadow/events{/privacy}","received_events_url":"https://api.github.com/users/CyberShadow/received_events","type":"User","site_admin":false},"body":"Don't you then mean that the gamma ramp is a separate property applicable to all colour spaces? So any color space can have a gamma ramp of 1.0 (linear), 2.2, sRGB etc.?","created_at":"2015-06-19T14:03:02Z","updated_at":"2015-06-19T14:03:02Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/2845#discussion_r32831254","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/32831254"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2845#discussion_r32831254"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845","id":26891491,"html_url":"https://github.com/D-Programming-Language/phobos/pull/2845","diff_url":"https://github.com/D-Programming-Language/phobos/pull/2845.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/2845.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845","number":2845,"state":"open","locked":false,"title":"Added std.experimental.color","user":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"body":"There's talk about adding a std.colour type, here's a starting point for consideration.\r\nKnows about colour space and comprehensive format conversions.\r\nMore common colour spaces to come.","created_at":"2015-01-06T14:26:36Z","updated_at":"2015-06-19T14:03:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c51157e95e0ff2f3ecee0901a8af530098216f1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/770a722d3b67b79399c47685269ac287c2dc5c58","head":{"label":"TurkeyMan:colour","ref":"colour","sha":"770a722d3b67b79399c47685269ac287c2dc5c58","user":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"repo":{"id":3272507,"name":"phobos","full_name":"TurkeyMan/phobos","owner":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TurkeyMan/phobos","description":"Runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/TurkeyMan/phobos","forks_url":"https://api.github.com/repos/TurkeyMan/phobos/forks","keys_url":"https://api.github.com/repos/TurkeyMan/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TurkeyMan/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TurkeyMan/phobos/teams","hooks_url":"https://api.github.com/repos/TurkeyMan/phobos/hooks","issue_events_url":"https://api.github.com/repos/TurkeyMan/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/TurkeyMan/phobos/events","assignees_url":"https://api.github.com/repos/TurkeyMan/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/TurkeyMan/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/TurkeyMan/phobos/tags","blobs_url":"https://api.github.com/repos/TurkeyMan/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TurkeyMan/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TurkeyMan/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/TurkeyMan/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TurkeyMan/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/TurkeyMan/phobos/languages","stargazers_url":"https://api.github.com/repos/TurkeyMan/phobos/stargazers","contributors_url":"https://api.github.com/repos/TurkeyMan/phobos/contributors","subscribers_url":"https://api.github.com/repos/TurkeyMan/phobos/subscribers","subscription_url":"https://api.github.com/repos/TurkeyMan/phobos/subscription","commits_url":"https://api.github.com/repos/TurkeyMan/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/TurkeyMan/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/TurkeyMan/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/TurkeyMan/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/TurkeyMan/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/TurkeyMan/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TurkeyMan/phobos/merges","archive_url":"https://api.github.com/repos/TurkeyMan/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TurkeyMan/phobos/downloads","issues_url":"https://api.github.com/repos/TurkeyMan/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/TurkeyMan/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/TurkeyMan/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/TurkeyMan/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TurkeyMan/phobos/labels{/name}","releases_url":"https://api.github.com/repos/TurkeyMan/phobos/releases{/id}","created_at":"2012-01-26T09:23:24Z","updated_at":"2015-01-10T02:32:11Z","pushed_at":"2015-06-19T13:20:53Z","git_url":"git://github.com/TurkeyMan/phobos.git","ssh_url":"git@github.com:TurkeyMan/phobos.git","clone_url":"https://github.com/TurkeyMan/phobos.git","svn_url":"https://github.com/TurkeyMan/phobos","homepage":"d-programming-language.org","size":43239,"stargazers_count":6,"watchers_count":6,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":6,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"559038b363143ae2e0d518a1a5679b9d7c3c100a","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"D-Programming-Language/phobos","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/phobos","forks_url":"https://api.github.com/repos/D-Programming-Language/phobos/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/phobos/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/phobos/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/phobos/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/phobos/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/phobos/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/phobos/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/phobos/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/phobos/releases{/id}","created_at":"2011-01-15T07:00:06Z","updated_at":"2015-06-17T14:55:53Z","pushed_at":"2015-06-19T13:20:54Z","git_url":"git://github.com/D-Programming-Language/phobos.git","ssh_url":"git@github.com:D-Programming-Language/phobos.git","clone_url":"https://github.com/D-Programming-Language/phobos.git","svn_url":"https://github.com/D-Programming-Language/phobos","homepage":"dlang.org/phobos","size":85907,"stargazers_count":609,"watchers_count":609,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":408,"mirror_url":null,"open_issues_count":79,"forks":408,"open_issues":79,"watchers":609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2845"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/770a722d3b67b79399c47685269ac287c2dc5c58"}}}}