{"action":"created","comment":{"url":"https://api.github.com/repos/Ogeon/palette/pulls/comments/54749055","id":54749055,"diff_hunk":"@@ -28,23 +37,59 @@ pub struct Lch<T: Float = f32> {\n     ///The hue of the color, in degrees. Decides if it's red, blue, purple,\n     ///etc.\n     pub hue: LabHue<T>,\n+\n+    ///The white point associated with the color's illuminant and observer.\n+    ///D65 for 2 degree observer is used by default.\n+    pub white_point: PhantomData<Wp>,\n+}\n+\n+impl<Wp, T> Copy for Lch<Wp,T>\n+    where T: Float,\n+        Wp: WhitePoint<T>\n+{}\n+\n+impl<Wp, T> Clone for Lch<Wp,T>\n+    where T: Float,\n+        Wp: WhitePoint<T>\n+{\n+    fn clone(&self) -> Lch<Wp,T> { *self }\n }\n \n-impl<T: Float> Lch<T> {\n+impl<T> Lch<D65, T>\n+    where T: Float,\n+{\n+    ///CIE L*C*h° with white point D65.\n+        pub fn new(l: T, chroma: T, hue: LabHue<T>) -> Lch<D65, T> {\n+        Lch {\n+            l: l,\n+            chroma: chroma,\n+            hue: hue,\n+            white_point: PhantomData,\n+        }\n+    }\n+}\n+\n+impl<Wp, T> Lch<Wp,T>\n+    where T: Float,\n+        Wp: WhitePoint<T>\n+{\n     ///CIE L*C*h°.\n-    pub fn new(l: T, chroma: T, hue: LabHue<T>) -> Lch<T> {\n+        pub fn with_wp(l: T, chroma: T, hue: LabHue<T>) -> Lch<Wp, T> {","path":"src/lch.rs","position":77,"original_position":77,"commit_id":"38894f39ca98d52f12aa023a08a5435b54f96dcd","original_commit_id":"38894f39ca98d52f12aa023a08a5435b54f96dcd","user":{"login":"Ogeon","id":225229,"avatar_url":"https://avatars.githubusercontent.com/u/225229?v=3","gravatar_id":"","url":"https://api.github.com/users/Ogeon","html_url":"https://github.com/Ogeon","followers_url":"https://api.github.com/users/Ogeon/followers","following_url":"https://api.github.com/users/Ogeon/following{/other_user}","gists_url":"https://api.github.com/users/Ogeon/gists{/gist_id}","starred_url":"https://api.github.com/users/Ogeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ogeon/subscriptions","organizations_url":"https://api.github.com/users/Ogeon/orgs","repos_url":"https://api.github.com/users/Ogeon/repos","events_url":"https://api.github.com/users/Ogeon/events{/privacy}","received_events_url":"https://api.github.com/users/Ogeon/received_events","type":"User","site_admin":false},"body":"Looks like an accidental extra indentation.","created_at":"2016-03-02T16:30:22Z","updated_at":"2016-03-02T16:30:22Z","html_url":"https://github.com/Ogeon/palette/pull/56#discussion_r54749055","pull_request_url":"https://api.github.com/repos/Ogeon/palette/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/Ogeon/palette/pulls/comments/54749055"},"html":{"href":"https://github.com/Ogeon/palette/pull/56#discussion_r54749055"},"pull_request":{"href":"https://api.github.com/repos/Ogeon/palette/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/Ogeon/palette/pulls/56","id":60619060,"html_url":"https://github.com/Ogeon/palette/pull/56","diff_url":"https://github.com/Ogeon/palette/pull/56.diff","patch_url":"https://github.com/Ogeon/palette/pull/56.patch","issue_url":"https://api.github.com/repos/Ogeon/palette/issues/56","number":56,"state":"open","locked":false,"title":"[WIP] Make color spaces white point aware","user":{"login":"sidred","id":6623285,"avatar_url":"https://avatars.githubusercontent.com/u/6623285?v=3","gravatar_id":"","url":"https://api.github.com/users/sidred","html_url":"https://github.com/sidred","followers_url":"https://api.github.com/users/sidred/followers","following_url":"https://api.github.com/users/sidred/following{/other_user}","gists_url":"https://api.github.com/users/sidred/gists{/gist_id}","starred_url":"https://api.github.com/users/sidred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidred/subscriptions","organizations_url":"https://api.github.com/users/sidred/orgs","repos_url":"https://api.github.com/users/sidred/repos","events_url":"https://api.github.com/users/sidred/events{/privacy}","received_events_url":"https://api.github.com/users/sidred/received_events","type":"User","site_admin":false},"body":"Add white point to all colors.","created_at":"2016-02-25T03:19:29Z","updated_at":"2016-03-02T16:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e946c55c8c409c06b66243de67eb158967fcb5c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ogeon/palette/pulls/56/commits","review_comments_url":"https://api.github.com/repos/Ogeon/palette/pulls/56/comments","review_comment_url":"https://api.github.com/repos/Ogeon/palette/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ogeon/palette/issues/56/comments","statuses_url":"https://api.github.com/repos/Ogeon/palette/statuses/38894f39ca98d52f12aa023a08a5435b54f96dcd","head":{"label":"sidred:white_point","ref":"white_point","sha":"38894f39ca98d52f12aa023a08a5435b54f96dcd","user":{"login":"sidred","id":6623285,"avatar_url":"https://avatars.githubusercontent.com/u/6623285?v=3","gravatar_id":"","url":"https://api.github.com/users/sidred","html_url":"https://github.com/sidred","followers_url":"https://api.github.com/users/sidred/followers","following_url":"https://api.github.com/users/sidred/following{/other_user}","gists_url":"https://api.github.com/users/sidred/gists{/gist_id}","starred_url":"https://api.github.com/users/sidred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidred/subscriptions","organizations_url":"https://api.github.com/users/sidred/orgs","repos_url":"https://api.github.com/users/sidred/repos","events_url":"https://api.github.com/users/sidred/events{/privacy}","received_events_url":"https://api.github.com/users/sidred/received_events","type":"User","site_admin":false},"repo":{"id":49519153,"name":"palette","full_name":"sidred/palette","owner":{"login":"sidred","id":6623285,"avatar_url":"https://avatars.githubusercontent.com/u/6623285?v=3","gravatar_id":"","url":"https://api.github.com/users/sidred","html_url":"https://github.com/sidred","followers_url":"https://api.github.com/users/sidred/followers","following_url":"https://api.github.com/users/sidred/following{/other_user}","gists_url":"https://api.github.com/users/sidred/gists{/gist_id}","starred_url":"https://api.github.com/users/sidred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidred/subscriptions","organizations_url":"https://api.github.com/users/sidred/orgs","repos_url":"https://api.github.com/users/sidred/repos","events_url":"https://api.github.com/users/sidred/events{/privacy}","received_events_url":"https://api.github.com/users/sidred/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sidred/palette","description":"A Rust library for linear color calculations and conversion","fork":true,"url":"https://api.github.com/repos/sidred/palette","forks_url":"https://api.github.com/repos/sidred/palette/forks","keys_url":"https://api.github.com/repos/sidred/palette/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sidred/palette/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sidred/palette/teams","hooks_url":"https://api.github.com/repos/sidred/palette/hooks","issue_events_url":"https://api.github.com/repos/sidred/palette/issues/events{/number}","events_url":"https://api.github.com/repos/sidred/palette/events","assignees_url":"https://api.github.com/repos/sidred/palette/assignees{/user}","branches_url":"https://api.github.com/repos/sidred/palette/branches{/branch}","tags_url":"https://api.github.com/repos/sidred/palette/tags","blobs_url":"https://api.github.com/repos/sidred/palette/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sidred/palette/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sidred/palette/git/refs{/sha}","trees_url":"https://api.github.com/repos/sidred/palette/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sidred/palette/statuses/{sha}","languages_url":"https://api.github.com/repos/sidred/palette/languages","stargazers_url":"https://api.github.com/repos/sidred/palette/stargazers","contributors_url":"https://api.github.com/repos/sidred/palette/contributors","subscribers_url":"https://api.github.com/repos/sidred/palette/subscribers","subscription_url":"https://api.github.com/repos/sidred/palette/subscription","commits_url":"https://api.github.com/repos/sidred/palette/commits{/sha}","git_commits_url":"https://api.github.com/repos/sidred/palette/git/commits{/sha}","comments_url":"https://api.github.com/repos/sidred/palette/comments{/number}","issue_comment_url":"https://api.github.com/repos/sidred/palette/issues/comments{/number}","contents_url":"https://api.github.com/repos/sidred/palette/contents/{+path}","compare_url":"https://api.github.com/repos/sidred/palette/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sidred/palette/merges","archive_url":"https://api.github.com/repos/sidred/palette/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sidred/palette/downloads","issues_url":"https://api.github.com/repos/sidred/palette/issues{/number}","pulls_url":"https://api.github.com/repos/sidred/palette/pulls{/number}","milestones_url":"https://api.github.com/repos/sidred/palette/milestones{/number}","notifications_url":"https://api.github.com/repos/sidred/palette/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sidred/palette/labels{/name}","releases_url":"https://api.github.com/repos/sidred/palette/releases{/id}","deployments_url":"https://api.github.com/repos/sidred/palette/deployments","created_at":"2016-01-12T18:08:36Z","updated_at":"2016-01-20T03:18:42Z","pushed_at":"2016-03-02T14:05:32Z","git_url":"git://github.com/sidred/palette.git","ssh_url":"git@github.com:sidred/palette.git","clone_url":"https://github.com/sidred/palette.git","svn_url":"https://github.com/sidred/palette","homepage":null,"size":1577,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ogeon:master","ref":"master","sha":"ab3c57b524063cce4f63af8de0a5a2e7d2c98104","user":{"login":"Ogeon","id":225229,"avatar_url":"https://avatars.githubusercontent.com/u/225229?v=3","gravatar_id":"","url":"https://api.github.com/users/Ogeon","html_url":"https://github.com/Ogeon","followers_url":"https://api.github.com/users/Ogeon/followers","following_url":"https://api.github.com/users/Ogeon/following{/other_user}","gists_url":"https://api.github.com/users/Ogeon/gists{/gist_id}","starred_url":"https://api.github.com/users/Ogeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ogeon/subscriptions","organizations_url":"https://api.github.com/users/Ogeon/orgs","repos_url":"https://api.github.com/users/Ogeon/repos","events_url":"https://api.github.com/users/Ogeon/events{/privacy}","received_events_url":"https://api.github.com/users/Ogeon/received_events","type":"User","site_admin":false},"repo":{"id":47269390,"name":"palette","full_name":"Ogeon/palette","owner":{"login":"Ogeon","id":225229,"avatar_url":"https://avatars.githubusercontent.com/u/225229?v=3","gravatar_id":"","url":"https://api.github.com/users/Ogeon","html_url":"https://github.com/Ogeon","followers_url":"https://api.github.com/users/Ogeon/followers","following_url":"https://api.github.com/users/Ogeon/following{/other_user}","gists_url":"https://api.github.com/users/Ogeon/gists{/gist_id}","starred_url":"https://api.github.com/users/Ogeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ogeon/subscriptions","organizations_url":"https://api.github.com/users/Ogeon/orgs","repos_url":"https://api.github.com/users/Ogeon/repos","events_url":"https://api.github.com/users/Ogeon/events{/privacy}","received_events_url":"https://api.github.com/users/Ogeon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ogeon/palette","description":"A Rust library for linear color calculations and conversion","fork":false,"url":"https://api.github.com/repos/Ogeon/palette","forks_url":"https://api.github.com/repos/Ogeon/palette/forks","keys_url":"https://api.github.com/repos/Ogeon/palette/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ogeon/palette/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ogeon/palette/teams","hooks_url":"https://api.github.com/repos/Ogeon/palette/hooks","issue_events_url":"https://api.github.com/repos/Ogeon/palette/issues/events{/number}","events_url":"https://api.github.com/repos/Ogeon/palette/events","assignees_url":"https://api.github.com/repos/Ogeon/palette/assignees{/user}","branches_url":"https://api.github.com/repos/Ogeon/palette/branches{/branch}","tags_url":"https://api.github.com/repos/Ogeon/palette/tags","blobs_url":"https://api.github.com/repos/Ogeon/palette/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ogeon/palette/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ogeon/palette/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ogeon/palette/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ogeon/palette/statuses/{sha}","languages_url":"https://api.github.com/repos/Ogeon/palette/languages","stargazers_url":"https://api.github.com/repos/Ogeon/palette/stargazers","contributors_url":"https://api.github.com/repos/Ogeon/palette/contributors","subscribers_url":"https://api.github.com/repos/Ogeon/palette/subscribers","subscription_url":"https://api.github.com/repos/Ogeon/palette/subscription","commits_url":"https://api.github.com/repos/Ogeon/palette/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ogeon/palette/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ogeon/palette/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ogeon/palette/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ogeon/palette/contents/{+path}","compare_url":"https://api.github.com/repos/Ogeon/palette/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ogeon/palette/merges","archive_url":"https://api.github.com/repos/Ogeon/palette/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ogeon/palette/downloads","issues_url":"https://api.github.com/repos/Ogeon/palette/issues{/number}","pulls_url":"https://api.github.com/repos/Ogeon/palette/pulls{/number}","milestones_url":"https://api.github.com/repos/Ogeon/palette/milestones{/number}","notifications_url":"https://api.github.com/repos/Ogeon/palette/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ogeon/palette/labels{/name}","releases_url":"https://api.github.com/repos/Ogeon/palette/releases{/id}","deployments_url":"https://api.github.com/repos/Ogeon/palette/deployments","created_at":"2015-12-02T15:18:40Z","updated_at":"2016-03-01T12:36:26Z","pushed_at":"2016-03-02T14:05:33Z","git_url":"git://github.com/Ogeon/palette.git","ssh_url":"git@github.com:Ogeon/palette.git","clone_url":"https://github.com/Ogeon/palette.git","svn_url":"https://github.com/Ogeon/palette","homepage":null,"size":1371,"stargazers_count":47,"watchers_count":47,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":14,"forks":2,"open_issues":14,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ogeon/palette/pulls/56"},"html":{"href":"https://github.com/Ogeon/palette/pull/56"},"issue":{"href":"https://api.github.com/repos/Ogeon/palette/issues/56"},"comments":{"href":"https://api.github.com/repos/Ogeon/palette/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/Ogeon/palette/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/Ogeon/palette/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ogeon/palette/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/Ogeon/palette/statuses/38894f39ca98d52f12aa023a08a5435b54f96dcd"}}}}