{"action":"created","comment":{"url":"https://api.github.com/repos/kennycason/kumo/pulls/comments/45367900","id":45367900,"diff_hunk":"@@ -0,0 +1,102 @@\n+package wordcloud.palette;\n+\n+import java.awt.Color;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+/**\n+ * A LinearGradient ColorPalette\n+ * \n+ * @author &#64;wolfposd\n+ */\n+public class LinearGradientColorPalette extends ColorPalette\n+{\n+    /**\n+     * <p>\n+     * Creates a ColorPalette using a linear gradient between the two colors\n+     * specified\n+     * </p>\n+     * <p>\n+     * The following example code will generate a gradient between red and blue,\n+     * with 18 colors in between red and blue, thus totaling 20 colors:\n+     * </p>\n+     * <code>\n+     * new LinearGradientColorPalette(Color.RED, 18, Color.Blue)\n+     * </code>\n+     * \n+     * @param color1\n+     *            start color\n+     * @param betweenC1andC2\n+     *            specifies the amount of colors for this gradient between\n+     *            color1 and color2\n+     * @param color2\n+     *            end color\n+     */\n+    public LinearGradientColorPalette(Color color1, int betweenC1andC2, Color color2)\n+    {\n+        this.colors = createLinearGradient(color1, color2, betweenC1andC2).toArray(new Color[] {});\n+    }\n+\n+    /**\n+     * Creates a ColorPalette using a linear gradient between the three colors\n+     * specified\n+     * \n+     * @param color1\n+     *            start color\n+     * @param betweenC1andC2\n+     *            number of colors to be generated between color1 and color2\n+     * @param color2\n+     *            middle color\n+     * @param betweenC2andC3\n+     *            number of colors to be generated between color2 and color3\n+     * @param color3\n+     *            end color\n+     */\n+    public LinearGradientColorPalette(Color color1, int betweenC1andC2, Color color2, int betweenC2andC3, Color color3)\n+    {\n+        ArrayList<Color> cs = new ArrayList<>();","path":"src/main/java/wordcloud/palette/LinearGradientColorPalette.java","position":57,"original_position":57,"commit_id":"7844985485208f86cc32be0c8370ffa78c886e8d","original_commit_id":"7844985485208f86cc32be0c8370ffa78c886e8d","user":{"login":"kennycason","id":2858428,"avatar_url":"https://avatars.githubusercontent.com/u/2858428?v=3","gravatar_id":"","url":"https://api.github.com/users/kennycason","html_url":"https://github.com/kennycason","followers_url":"https://api.github.com/users/kennycason/followers","following_url":"https://api.github.com/users/kennycason/following{/other_user}","gists_url":"https://api.github.com/users/kennycason/gists{/gist_id}","starred_url":"https://api.github.com/users/kennycason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennycason/subscriptions","organizations_url":"https://api.github.com/users/kennycason/orgs","repos_url":"https://api.github.com/users/kennycason/repos","events_url":"https://api.github.com/users/kennycason/events{/privacy}","received_events_url":"https://api.github.com/users/kennycason/received_events","type":"User","site_admin":false},"body":"prefer `List<Color> cs = new ArrayList<>();`","created_at":"2015-11-19T16:57:34Z","updated_at":"2015-11-19T16:57:34Z","html_url":"https://github.com/kennycason/kumo/pull/17#discussion_r45367900","pull_request_url":"https://api.github.com/repos/kennycason/kumo/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/kennycason/kumo/pulls/comments/45367900"},"html":{"href":"https://github.com/kennycason/kumo/pull/17#discussion_r45367900"},"pull_request":{"href":"https://api.github.com/repos/kennycason/kumo/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/kennycason/kumo/pulls/17","id":51232539,"html_url":"https://github.com/kennycason/kumo/pull/17","diff_url":"https://github.com/kennycason/kumo/pull/17.diff","patch_url":"https://github.com/kennycason/kumo/pull/17.patch","issue_url":"https://api.github.com/repos/kennycason/kumo/issues/17","number":17,"state":"open","locked":false,"title":"Adding a LinearGradient subclass of ColorPalette","user":{"login":"wolfposd","id":2557290,"avatar_url":"https://avatars.githubusercontent.com/u/2557290?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfposd","html_url":"https://github.com/wolfposd","followers_url":"https://api.github.com/users/wolfposd/followers","following_url":"https://api.github.com/users/wolfposd/following{/other_user}","gists_url":"https://api.github.com/users/wolfposd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfposd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfposd/subscriptions","organizations_url":"https://api.github.com/users/wolfposd/orgs","repos_url":"https://api.github.com/users/wolfposd/repos","events_url":"https://api.github.com/users/wolfposd/events{/privacy}","received_events_url":"https://api.github.com/users/wolfposd/received_events","type":"User","site_admin":false},"body":"Adds a Subclass of ColorPalette, which enables to specify GradientLike colorpalettes.\r\n\r\nnew LinearGradientColorPalette(Color.RED, 18, Color.Blue);\r\n// creates a ColorPalette with colors ranging between Red and Blue, with 18 colors in between\r\n\r\nnew LinearGradientColorPalette(Color.RED, 5, Color.BLUE, 5, Color.GREEN); \r\n// creates a ColorPalette with colors ranging from Red over Blue to Green, with 5 colors in between each","created_at":"2015-11-19T14:57:51Z","updated_at":"2015-11-19T16:57:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4831cbe17341903ff416c240099b61ee19c6d58d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kennycason/kumo/pulls/17/commits","review_comments_url":"https://api.github.com/repos/kennycason/kumo/pulls/17/comments","review_comment_url":"https://api.github.com/repos/kennycason/kumo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kennycason/kumo/issues/17/comments","statuses_url":"https://api.github.com/repos/kennycason/kumo/statuses/7844985485208f86cc32be0c8370ffa78c886e8d","head":{"label":"wolfposd:master","ref":"master","sha":"7844985485208f86cc32be0c8370ffa78c886e8d","user":{"login":"wolfposd","id":2557290,"avatar_url":"https://avatars.githubusercontent.com/u/2557290?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfposd","html_url":"https://github.com/wolfposd","followers_url":"https://api.github.com/users/wolfposd/followers","following_url":"https://api.github.com/users/wolfposd/following{/other_user}","gists_url":"https://api.github.com/users/wolfposd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfposd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfposd/subscriptions","organizations_url":"https://api.github.com/users/wolfposd/orgs","repos_url":"https://api.github.com/users/wolfposd/repos","events_url":"https://api.github.com/users/wolfposd/events{/privacy}","received_events_url":"https://api.github.com/users/wolfposd/received_events","type":"User","site_admin":false},"repo":{"id":46486121,"name":"kumo","full_name":"wolfposd/kumo","owner":{"login":"wolfposd","id":2557290,"avatar_url":"https://avatars.githubusercontent.com/u/2557290?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfposd","html_url":"https://github.com/wolfposd","followers_url":"https://api.github.com/users/wolfposd/followers","following_url":"https://api.github.com/users/wolfposd/following{/other_user}","gists_url":"https://api.github.com/users/wolfposd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfposd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfposd/subscriptions","organizations_url":"https://api.github.com/users/wolfposd/orgs","repos_url":"https://api.github.com/users/wolfposd/repos","events_url":"https://api.github.com/users/wolfposd/events{/privacy}","received_events_url":"https://api.github.com/users/wolfposd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wolfposd/kumo","description":"Kumo - Java Word Cloud ","fork":true,"url":"https://api.github.com/repos/wolfposd/kumo","forks_url":"https://api.github.com/repos/wolfposd/kumo/forks","keys_url":"https://api.github.com/repos/wolfposd/kumo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolfposd/kumo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolfposd/kumo/teams","hooks_url":"https://api.github.com/repos/wolfposd/kumo/hooks","issue_events_url":"https://api.github.com/repos/wolfposd/kumo/issues/events{/number}","events_url":"https://api.github.com/repos/wolfposd/kumo/events","assignees_url":"https://api.github.com/repos/wolfposd/kumo/assignees{/user}","branches_url":"https://api.github.com/repos/wolfposd/kumo/branches{/branch}","tags_url":"https://api.github.com/repos/wolfposd/kumo/tags","blobs_url":"https://api.github.com/repos/wolfposd/kumo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolfposd/kumo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolfposd/kumo/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolfposd/kumo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolfposd/kumo/statuses/{sha}","languages_url":"https://api.github.com/repos/wolfposd/kumo/languages","stargazers_url":"https://api.github.com/repos/wolfposd/kumo/stargazers","contributors_url":"https://api.github.com/repos/wolfposd/kumo/contributors","subscribers_url":"https://api.github.com/repos/wolfposd/kumo/subscribers","subscription_url":"https://api.github.com/repos/wolfposd/kumo/subscription","commits_url":"https://api.github.com/repos/wolfposd/kumo/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolfposd/kumo/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolfposd/kumo/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolfposd/kumo/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolfposd/kumo/contents/{+path}","compare_url":"https://api.github.com/repos/wolfposd/kumo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolfposd/kumo/merges","archive_url":"https://api.github.com/repos/wolfposd/kumo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolfposd/kumo/downloads","issues_url":"https://api.github.com/repos/wolfposd/kumo/issues{/number}","pulls_url":"https://api.github.com/repos/wolfposd/kumo/pulls{/number}","milestones_url":"https://api.github.com/repos/wolfposd/kumo/milestones{/number}","notifications_url":"https://api.github.com/repos/wolfposd/kumo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolfposd/kumo/labels{/name}","releases_url":"https://api.github.com/repos/wolfposd/kumo/releases{/id}","created_at":"2015-11-19T10:48:43Z","updated_at":"2015-11-19T10:48:45Z","pushed_at":"2015-11-19T14:52:23Z","git_url":"git://github.com/wolfposd/kumo.git","ssh_url":"git@github.com:wolfposd/kumo.git","clone_url":"https://github.com/wolfposd/kumo.git","svn_url":"https://github.com/wolfposd/kumo","homepage":null,"size":17881,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"kennycason:master","ref":"master","sha":"826b96630b9142c629b72551f74d67319a50e576","user":{"login":"kennycason","id":2858428,"avatar_url":"https://avatars.githubusercontent.com/u/2858428?v=3","gravatar_id":"","url":"https://api.github.com/users/kennycason","html_url":"https://github.com/kennycason","followers_url":"https://api.github.com/users/kennycason/followers","following_url":"https://api.github.com/users/kennycason/following{/other_user}","gists_url":"https://api.github.com/users/kennycason/gists{/gist_id}","starred_url":"https://api.github.com/users/kennycason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennycason/subscriptions","organizations_url":"https://api.github.com/users/kennycason/orgs","repos_url":"https://api.github.com/users/kennycason/repos","events_url":"https://api.github.com/users/kennycason/events{/privacy}","received_events_url":"https://api.github.com/users/kennycason/received_events","type":"User","site_admin":false},"repo":{"id":21477166,"name":"kumo","full_name":"kennycason/kumo","owner":{"login":"kennycason","id":2858428,"avatar_url":"https://avatars.githubusercontent.com/u/2858428?v=3","gravatar_id":"","url":"https://api.github.com/users/kennycason","html_url":"https://github.com/kennycason","followers_url":"https://api.github.com/users/kennycason/followers","following_url":"https://api.github.com/users/kennycason/following{/other_user}","gists_url":"https://api.github.com/users/kennycason/gists{/gist_id}","starred_url":"https://api.github.com/users/kennycason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennycason/subscriptions","organizations_url":"https://api.github.com/users/kennycason/orgs","repos_url":"https://api.github.com/users/kennycason/repos","events_url":"https://api.github.com/users/kennycason/events{/privacy}","received_events_url":"https://api.github.com/users/kennycason/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kennycason/kumo","description":"Kumo - Java Word Cloud ","fork":false,"url":"https://api.github.com/repos/kennycason/kumo","forks_url":"https://api.github.com/repos/kennycason/kumo/forks","keys_url":"https://api.github.com/repos/kennycason/kumo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kennycason/kumo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kennycason/kumo/teams","hooks_url":"https://api.github.com/repos/kennycason/kumo/hooks","issue_events_url":"https://api.github.com/repos/kennycason/kumo/issues/events{/number}","events_url":"https://api.github.com/repos/kennycason/kumo/events","assignees_url":"https://api.github.com/repos/kennycason/kumo/assignees{/user}","branches_url":"https://api.github.com/repos/kennycason/kumo/branches{/branch}","tags_url":"https://api.github.com/repos/kennycason/kumo/tags","blobs_url":"https://api.github.com/repos/kennycason/kumo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kennycason/kumo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kennycason/kumo/git/refs{/sha}","trees_url":"https://api.github.com/repos/kennycason/kumo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kennycason/kumo/statuses/{sha}","languages_url":"https://api.github.com/repos/kennycason/kumo/languages","stargazers_url":"https://api.github.com/repos/kennycason/kumo/stargazers","contributors_url":"https://api.github.com/repos/kennycason/kumo/contributors","subscribers_url":"https://api.github.com/repos/kennycason/kumo/subscribers","subscription_url":"https://api.github.com/repos/kennycason/kumo/subscription","commits_url":"https://api.github.com/repos/kennycason/kumo/commits{/sha}","git_commits_url":"https://api.github.com/repos/kennycason/kumo/git/commits{/sha}","comments_url":"https://api.github.com/repos/kennycason/kumo/comments{/number}","issue_comment_url":"https://api.github.com/repos/kennycason/kumo/issues/comments{/number}","contents_url":"https://api.github.com/repos/kennycason/kumo/contents/{+path}","compare_url":"https://api.github.com/repos/kennycason/kumo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kennycason/kumo/merges","archive_url":"https://api.github.com/repos/kennycason/kumo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kennycason/kumo/downloads","issues_url":"https://api.github.com/repos/kennycason/kumo/issues{/number}","pulls_url":"https://api.github.com/repos/kennycason/kumo/pulls{/number}","milestones_url":"https://api.github.com/repos/kennycason/kumo/milestones{/number}","notifications_url":"https://api.github.com/repos/kennycason/kumo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kennycason/kumo/labels{/name}","releases_url":"https://api.github.com/repos/kennycason/kumo/releases{/id}","created_at":"2014-07-03T21:14:53Z","updated_at":"2015-11-14T22:59:37Z","pushed_at":"2015-11-19T14:57:52Z","git_url":"git://github.com/kennycason/kumo.git","ssh_url":"git@github.com:kennycason/kumo.git","clone_url":"https://github.com/kennycason/kumo.git","svn_url":"https://github.com/kennycason/kumo","homepage":null,"size":18319,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":7,"forks":14,"open_issues":7,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kennycason/kumo/pulls/17"},"html":{"href":"https://github.com/kennycason/kumo/pull/17"},"issue":{"href":"https://api.github.com/repos/kennycason/kumo/issues/17"},"comments":{"href":"https://api.github.com/repos/kennycason/kumo/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/kennycason/kumo/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/kennycason/kumo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kennycason/kumo/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/kennycason/kumo/statuses/7844985485208f86cc32be0c8370ffa78c886e8d"}}}}