{"action":"created","issue":{"url":"https://api.github.com/repos/Ogeon/palette/issues/17","labels_url":"https://api.github.com/repos/Ogeon/palette/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/Ogeon/palette/issues/17/comments","events_url":"https://api.github.com/repos/Ogeon/palette/issues/17/events","html_url":"https://github.com/Ogeon/palette/pull/17","id":127952681,"number":17,"title":"Make all colors generic over f32 and f64","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-21T15:41:28Z","updated_at":"2016-01-21T16:46:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Ogeon/palette/pulls/17","html_url":"https://github.com/Ogeon/palette/pull/17","diff_url":"https://github.com/Ogeon/palette/pull/17.diff","patch_url":"https://github.com/Ogeon/palette/pull/17.patch"},"body":"Closes #13\r\n\r\nNotes:\r\n- ```T::from( constant ).unwrap()``` etc was used in a number of places to convert constants to num::Float trait ( via the num::Numcast trait).\r\n- make_color and make_hues macros has issues due to enum names clashing with the imported colors which need a parameter. So a separate file with the macro was created ( hues_macros_gen.rs and  lib_macros_gen.rs). rustc --pretty=expanded was executed manually on these files and the result copied to lib.rs and hues.rs files\r\n\r\n- For the hues macro gen, ```impl<T: Float> Into<T> for $name<T>```  was manually implemented for f64 and f32\r\n\r\n- For impl for RgbPixel<T> , was manually implemented for [u8;4], [f32;4] and [f64;4]. The same was done for the tuple variants. "},"comment":{"url":"https://api.github.com/repos/Ogeon/palette/issues/comments/173630346","html_url":"https://github.com/Ogeon/palette/pull/17#issuecomment-173630346","issue_url":"https://api.github.com/repos/Ogeon/palette/issues/17","id":173630346,"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},"created_at":"2016-01-21T16:46:21Z","updated_at":"2016-01-21T16:46:21Z","body":"Also, regarding rustfmt in general; I prefer not to depend on it, since it's not really ready yet. There are still too many cases where it may mangle the code too much."}}