{"action":"created","comment":{"url":"https://api.github.com/repos/calblueprint/watershed/pulls/comments/29554534","id":29554534,"diff_hunk":"@@ -123,10 +122,18 @@ public static void showAndBuildDialog(Activity activity, String title, String me\n     }\n \n \n-    public static String getSecondaryColor(Context context, String primary) {\n-        if (primary == null) return \"#1976D2\";\n-        String[] COLORS = context.getResources().getStringArray(R.array.colors);\n-        String[] SECONDARY_COLORS = context.getResources().getStringArray(R.array.secondary_colors);\n-        return SECONDARY_COLORS[Arrays.asList(COLORS).indexOf(primary)];\n+    public static int getSecondaryColor(Context context, String primary) {\n+        if (primary == null) return Color.parseColor(\"#81B4DE\");\n+        int[] COLORS = context.getResources().getIntArray(R.array.colors);\n+        int[] SECONDARY_COLORS = context.getResources().getIntArray(R.array.secondary_colors);\n+        int color = Color.parseColor(primary);\n+        int foundColor = -1;\n+\n+        for (int i = 0; i < COLORS.length; i++) {\n+            if (COLORS[i] == color) foundColor = i;\n+        }\n+\n+        if (foundColor == -1) return Color.parseColor(\"#81B4DE\");","path":"watershed-android/watershed/app/src/main/java/com/blueprint/watershed/Utilities/Utility.java","position":37,"original_position":37,"commit_id":"71de41aa3992fd06be2b05afa1fd15cc247b7371","original_commit_id":"71de41aa3992fd06be2b05afa1fd15cc247b7371","user":{"login":"nishdesai","id":2476063,"avatar_url":"https://avatars.githubusercontent.com/u/2476063?v=3","gravatar_id":"","url":"https://api.github.com/users/nishdesai","html_url":"https://github.com/nishdesai","followers_url":"https://api.github.com/users/nishdesai/followers","following_url":"https://api.github.com/users/nishdesai/following{/other_user}","gists_url":"https://api.github.com/users/nishdesai/gists{/gist_id}","starred_url":"https://api.github.com/users/nishdesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nishdesai/subscriptions","organizations_url":"https://api.github.com/users/nishdesai/orgs","repos_url":"https://api.github.com/users/nishdesai/repos","events_url":"https://api.github.com/users/nishdesai/events{/privacy}","received_events_url":"https://api.github.com/users/nishdesai/received_events","type":"User","site_admin":false},"body":"and this one","created_at":"2015-05-03T09:42:05Z","updated_at":"2015-05-03T09:42:05Z","html_url":"https://github.com/calblueprint/watershed/pull/479#discussion_r29554534","pull_request_url":"https://api.github.com/repos/calblueprint/watershed/pulls/479","_links":{"self":{"href":"https://api.github.com/repos/calblueprint/watershed/pulls/comments/29554534"},"html":{"href":"https://github.com/calblueprint/watershed/pull/479#discussion_r29554534"},"pull_request":{"href":"https://api.github.com/repos/calblueprint/watershed/pulls/479"}}},"pull_request":{"url":"https://api.github.com/repos/calblueprint/watershed/pulls/479","id":34531278,"html_url":"https://github.com/calblueprint/watershed/pull/479","diff_url":"https://github.com/calblueprint/watershed/pull/479.diff","patch_url":"https://github.com/calblueprint/watershed/pull/479.patch","issue_url":"https://api.github.com/repos/calblueprint/watershed/issues/479","number":479,"state":"open","locked":false,"title":"Charles android tasks","user":{"login":"charlesx2013","id":5563367,"avatar_url":"https://avatars.githubusercontent.com/u/5563367?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesx2013","html_url":"https://github.com/charlesx2013","followers_url":"https://api.github.com/users/charlesx2013/followers","following_url":"https://api.github.com/users/charlesx2013/following{/other_user}","gists_url":"https://api.github.com/users/charlesx2013/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesx2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesx2013/subscriptions","organizations_url":"https://api.github.com/users/charlesx2013/orgs","repos_url":"https://api.github.com/users/charlesx2013/repos","events_url":"https://api.github.com/users/charlesx2013/events{/privacy}","received_events_url":"https://api.github.com/users/charlesx2013/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-01T10:40:08Z","updated_at":"2015-05-03T09:42:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c3b2d7032a0d50431acd094dc75d4dd30120c29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/calblueprint/watershed/pulls/479/commits","review_comments_url":"https://api.github.com/repos/calblueprint/watershed/pulls/479/comments","review_comment_url":"https://api.github.com/repos/calblueprint/watershed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/calblueprint/watershed/issues/479/comments","statuses_url":"https://api.github.com/repos/calblueprint/watershed/statuses/71de41aa3992fd06be2b05afa1fd15cc247b7371","head":{"label":"calblueprint:charles-android-tasks","ref":"charles-android-tasks","sha":"71de41aa3992fd06be2b05afa1fd15cc247b7371","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":24070067,"name":"watershed","full_name":"calblueprint/watershed","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/watershed","description":"Fall '14 The Watershed Project","fork":false,"url":"https://api.github.com/repos/calblueprint/watershed","forks_url":"https://api.github.com/repos/calblueprint/watershed/forks","keys_url":"https://api.github.com/repos/calblueprint/watershed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/watershed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/watershed/teams","hooks_url":"https://api.github.com/repos/calblueprint/watershed/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/watershed/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/watershed/events","assignees_url":"https://api.github.com/repos/calblueprint/watershed/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/watershed/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/watershed/tags","blobs_url":"https://api.github.com/repos/calblueprint/watershed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/watershed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/watershed/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/watershed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/watershed/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/watershed/languages","stargazers_url":"https://api.github.com/repos/calblueprint/watershed/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/watershed/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/watershed/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/watershed/subscription","commits_url":"https://api.github.com/repos/calblueprint/watershed/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/watershed/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/watershed/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/watershed/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/watershed/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/watershed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/watershed/merges","archive_url":"https://api.github.com/repos/calblueprint/watershed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/watershed/downloads","issues_url":"https://api.github.com/repos/calblueprint/watershed/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/watershed/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/watershed/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/watershed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/watershed/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/watershed/releases{/id}","created_at":"2014-09-15T19:16:49Z","updated_at":"2015-05-03T09:40:17Z","pushed_at":"2015-05-03T09:40:16Z","git_url":"git://github.com/calblueprint/watershed.git","ssh_url":"git@github.com:calblueprint/watershed.git","clone_url":"https://github.com/calblueprint/watershed.git","svn_url":"https://github.com/calblueprint/watershed","homepage":null,"size":22940,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":75,"forks":1,"open_issues":75,"watchers":9,"default_branch":"master"}},"base":{"label":"calblueprint:master","ref":"master","sha":"80299b7f00d442afbfb8b6c3b4795d2927b643b7","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":24070067,"name":"watershed","full_name":"calblueprint/watershed","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars.githubusercontent.com/u/2729578?v=3","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/watershed","description":"Fall '14 The Watershed Project","fork":false,"url":"https://api.github.com/repos/calblueprint/watershed","forks_url":"https://api.github.com/repos/calblueprint/watershed/forks","keys_url":"https://api.github.com/repos/calblueprint/watershed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/watershed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/watershed/teams","hooks_url":"https://api.github.com/repos/calblueprint/watershed/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/watershed/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/watershed/events","assignees_url":"https://api.github.com/repos/calblueprint/watershed/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/watershed/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/watershed/tags","blobs_url":"https://api.github.com/repos/calblueprint/watershed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/watershed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/watershed/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/watershed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/watershed/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/watershed/languages","stargazers_url":"https://api.github.com/repos/calblueprint/watershed/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/watershed/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/watershed/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/watershed/subscription","commits_url":"https://api.github.com/repos/calblueprint/watershed/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/watershed/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/watershed/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/watershed/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/watershed/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/watershed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/watershed/merges","archive_url":"https://api.github.com/repos/calblueprint/watershed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/watershed/downloads","issues_url":"https://api.github.com/repos/calblueprint/watershed/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/watershed/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/watershed/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/watershed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/watershed/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/watershed/releases{/id}","created_at":"2014-09-15T19:16:49Z","updated_at":"2015-05-03T09:40:17Z","pushed_at":"2015-05-03T09:40:16Z","git_url":"git://github.com/calblueprint/watershed.git","ssh_url":"git@github.com:calblueprint/watershed.git","clone_url":"https://github.com/calblueprint/watershed.git","svn_url":"https://github.com/calblueprint/watershed","homepage":null,"size":22940,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":75,"forks":1,"open_issues":75,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/calblueprint/watershed/pulls/479"},"html":{"href":"https://github.com/calblueprint/watershed/pull/479"},"issue":{"href":"https://api.github.com/repos/calblueprint/watershed/issues/479"},"comments":{"href":"https://api.github.com/repos/calblueprint/watershed/issues/479/comments"},"review_comments":{"href":"https://api.github.com/repos/calblueprint/watershed/pulls/479/comments"},"review_comment":{"href":"https://api.github.com/repos/calblueprint/watershed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/calblueprint/watershed/pulls/479/commits"},"statuses":{"href":"https://api.github.com/repos/calblueprint/watershed/statuses/71de41aa3992fd06be2b05afa1fd15cc247b7371"}}}}