{"action":"created","comment":{"url":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments/25525453","id":25525453,"diff_hunk":"@@ -27,13 +27,13 @@ tasklist.filter = {}\n local function tasklist_label(c, args)\n     if not args then args = {} end\n     local theme = beautiful.get()\n-    local fg_normal = args.fg_normal or theme.tasklist_fg_normal or theme.fg_normal or \"#ffffff\"\n+    local fg_normal = util.check_pango_color(args.fg_normal or theme.tasklist_fg_normal or theme.fg_normal) or \"white\"\n     local bg_normal = args.bg_normal or theme.tasklist_bg_normal or theme.bg_normal or \"#000000\"\n-    local fg_focus = args.fg_focus or theme.tasklist_fg_focus or theme.fg_focus\n+    local fg_focus = util.check_pango_color(args.fg_focus or theme.tasklist_fg_focus or theme.fg_focus)","path":"lib/awful/widget/tasklist.lua.in","position":8,"original_position":8,"commit_id":"113febf3fb62301996ceae91efc9958768893f10","original_commit_id":"113febf3fb62301996ceae91efc9958768893f10","user":{"login":"silverhammermba","id":1031867,"avatar_url":"https://avatars.githubusercontent.com/u/1031867?v=3","gravatar_id":"","url":"https://api.github.com/users/silverhammermba","html_url":"https://github.com/silverhammermba","followers_url":"https://api.github.com/users/silverhammermba/followers","following_url":"https://api.github.com/users/silverhammermba/following{/other_user}","gists_url":"https://api.github.com/users/silverhammermba/gists{/gist_id}","starred_url":"https://api.github.com/users/silverhammermba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverhammermba/subscriptions","organizations_url":"https://api.github.com/users/silverhammermba/orgs","repos_url":"https://api.github.com/users/silverhammermba/repos","events_url":"https://api.github.com/users/silverhammermba/events{/privacy}","received_events_url":"https://api.github.com/users/silverhammermba/received_events","type":"User","site_admin":false},"body":"Those all fall back to `fg_normal` in the if-elses later. That is the current behavior as well.","created_at":"2015-02-27T18:10:05Z","updated_at":"2015-02-27T18:10:05Z","html_url":"https://github.com/awesomeWM/awesome/pull/155#discussion_r25525453","pull_request_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/155","_links":{"self":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments/25525453"},"html":{"href":"https://github.com/awesomeWM/awesome/pull/155#discussion_r25525453"},"pull_request":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/155"}}},"pull_request":{"url":"https://api.github.com/repos/awesomeWM/awesome/pulls/155","id":30182564,"html_url":"https://github.com/awesomeWM/awesome/pull/155","diff_url":"https://github.com/awesomeWM/awesome/pull/155.diff","patch_url":"https://github.com/awesomeWM/awesome/pull/155.patch","issue_url":"https://api.github.com/repos/awesomeWM/awesome/issues/155","number":155,"state":"open","locked":false,"title":"Replace color_strip_alpha with check_pango_color","user":{"login":"silverhammermba","id":1031867,"avatar_url":"https://avatars.githubusercontent.com/u/1031867?v=3","gravatar_id":"","url":"https://api.github.com/users/silverhammermba","html_url":"https://github.com/silverhammermba","followers_url":"https://api.github.com/users/silverhammermba/followers","following_url":"https://api.github.com/users/silverhammermba/following{/other_user}","gists_url":"https://api.github.com/users/silverhammermba/gists{/gist_id}","starred_url":"https://api.github.com/users/silverhammermba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverhammermba/subscriptions","organizations_url":"https://api.github.com/users/silverhammermba/orgs","repos_url":"https://api.github.com/users/silverhammermba/repos","events_url":"https://api.github.com/users/silverhammermba/events{/privacy}","received_events_url":"https://api.github.com/users/silverhammermba/received_events","type":"User","site_admin":false},"body":"Awesome uses `awful.util.color_strip_alpha` to fix colors before they are inserted into Pango markup. This is because Pango doesn't support hex colors with transparency and would return an error.\r\n\r\nBut colors in awesome are not always hex codes, for example:\r\n\r\n 1. Sometimes background colors are inserted into Pango markup (e.g. for the menubar cursor #140). Background colors can be [Cairo patterns](http://awesome.naquadah.org/doc/api/modules/gears.color.html#create_pattern), which Pango does not support and which `color_strip_alpha` definitely won't fix.\r\n 2. Pango also supports [X11 color names](http://en.wikipedia.org/wiki/X11_color_names), which is why `theme.fg_normal = \"red\"` works. Since `color_strip_alpha` assumes hex color codes it breaks any color name that happens to be 9 characters long. Try setting `theme.fg_normal = \"chocolate\"`, for example.\r\n\r\nThis PR replaces `color_strip_alpha` with a more robust `check_pango_color` function that returns `nil` if the color is not safe to use in Pango markup (thus allowing for replacement with fallback colors rather than showing error messages or `<Invalid text>`). This will cause a slight regression for any theme that relies on the alpha being stripped from hex colors (those colors will be replaced by the fallbacks).","created_at":"2015-02-27T17:05:21Z","updated_at":"2015-02-27T18:10:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3b082c7728111cc63bc4d06ecf938520c47bcda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/155/commits","review_comments_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/155/comments","review_comment_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awesomeWM/awesome/issues/155/comments","statuses_url":"https://api.github.com/repos/awesomeWM/awesome/statuses/113febf3fb62301996ceae91efc9958768893f10","head":{"label":"silverhammermba:pango_color","ref":"pango_color","sha":"113febf3fb62301996ceae91efc9958768893f10","user":{"login":"silverhammermba","id":1031867,"avatar_url":"https://avatars.githubusercontent.com/u/1031867?v=3","gravatar_id":"","url":"https://api.github.com/users/silverhammermba","html_url":"https://github.com/silverhammermba","followers_url":"https://api.github.com/users/silverhammermba/followers","following_url":"https://api.github.com/users/silverhammermba/following{/other_user}","gists_url":"https://api.github.com/users/silverhammermba/gists{/gist_id}","starred_url":"https://api.github.com/users/silverhammermba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverhammermba/subscriptions","organizations_url":"https://api.github.com/users/silverhammermba/orgs","repos_url":"https://api.github.com/users/silverhammermba/repos","events_url":"https://api.github.com/users/silverhammermba/events{/privacy}","received_events_url":"https://api.github.com/users/silverhammermba/received_events","type":"User","site_admin":false},"repo":{"id":30458397,"name":"awesome","full_name":"silverhammermba/awesome","owner":{"login":"silverhammermba","id":1031867,"avatar_url":"https://avatars.githubusercontent.com/u/1031867?v=3","gravatar_id":"","url":"https://api.github.com/users/silverhammermba","html_url":"https://github.com/silverhammermba","followers_url":"https://api.github.com/users/silverhammermba/followers","following_url":"https://api.github.com/users/silverhammermba/following{/other_user}","gists_url":"https://api.github.com/users/silverhammermba/gists{/gist_id}","starred_url":"https://api.github.com/users/silverhammermba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverhammermba/subscriptions","organizations_url":"https://api.github.com/users/silverhammermba/orgs","repos_url":"https://api.github.com/users/silverhammermba/repos","events_url":"https://api.github.com/users/silverhammermba/events{/privacy}","received_events_url":"https://api.github.com/users/silverhammermba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/silverhammermba/awesome","description":"awesome window manager","fork":true,"url":"https://api.github.com/repos/silverhammermba/awesome","forks_url":"https://api.github.com/repos/silverhammermba/awesome/forks","keys_url":"https://api.github.com/repos/silverhammermba/awesome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverhammermba/awesome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverhammermba/awesome/teams","hooks_url":"https://api.github.com/repos/silverhammermba/awesome/hooks","issue_events_url":"https://api.github.com/repos/silverhammermba/awesome/issues/events{/number}","events_url":"https://api.github.com/repos/silverhammermba/awesome/events","assignees_url":"https://api.github.com/repos/silverhammermba/awesome/assignees{/user}","branches_url":"https://api.github.com/repos/silverhammermba/awesome/branches{/branch}","tags_url":"https://api.github.com/repos/silverhammermba/awesome/tags","blobs_url":"https://api.github.com/repos/silverhammermba/awesome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverhammermba/awesome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverhammermba/awesome/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverhammermba/awesome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverhammermba/awesome/statuses/{sha}","languages_url":"https://api.github.com/repos/silverhammermba/awesome/languages","stargazers_url":"https://api.github.com/repos/silverhammermba/awesome/stargazers","contributors_url":"https://api.github.com/repos/silverhammermba/awesome/contributors","subscribers_url":"https://api.github.com/repos/silverhammermba/awesome/subscribers","subscription_url":"https://api.github.com/repos/silverhammermba/awesome/subscription","commits_url":"https://api.github.com/repos/silverhammermba/awesome/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverhammermba/awesome/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverhammermba/awesome/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverhammermba/awesome/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverhammermba/awesome/contents/{+path}","compare_url":"https://api.github.com/repos/silverhammermba/awesome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverhammermba/awesome/merges","archive_url":"https://api.github.com/repos/silverhammermba/awesome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverhammermba/awesome/downloads","issues_url":"https://api.github.com/repos/silverhammermba/awesome/issues{/number}","pulls_url":"https://api.github.com/repos/silverhammermba/awesome/pulls{/number}","milestones_url":"https://api.github.com/repos/silverhammermba/awesome/milestones{/number}","notifications_url":"https://api.github.com/repos/silverhammermba/awesome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverhammermba/awesome/labels{/name}","releases_url":"https://api.github.com/repos/silverhammermba/awesome/releases{/id}","created_at":"2015-02-07T14:37:36Z","updated_at":"2015-02-22T06:56:50Z","pushed_at":"2015-02-27T16:30:39Z","git_url":"git://github.com/silverhammermba/awesome.git","ssh_url":"git@github.com:silverhammermba/awesome.git","clone_url":"https://github.com/silverhammermba/awesome.git","svn_url":"https://github.com/silverhammermba/awesome","homepage":"https://awesome.naquadah.org/","size":7882,"stargazers_count":0,"watchers_count":0,"language":"C","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":0,"default_branch":"master"}},"base":{"label":"awesomeWM:master","ref":"master","sha":"20ca989333a3edc581a6c873f0303e2d032ae249","user":{"login":"awesomeWM","id":6843364,"avatar_url":"https://avatars.githubusercontent.com/u/6843364?v=3","gravatar_id":"","url":"https://api.github.com/users/awesomeWM","html_url":"https://github.com/awesomeWM","followers_url":"https://api.github.com/users/awesomeWM/followers","following_url":"https://api.github.com/users/awesomeWM/following{/other_user}","gists_url":"https://api.github.com/users/awesomeWM/gists{/gist_id}","starred_url":"https://api.github.com/users/awesomeWM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesomeWM/subscriptions","organizations_url":"https://api.github.com/users/awesomeWM/orgs","repos_url":"https://api.github.com/users/awesomeWM/repos","events_url":"https://api.github.com/users/awesomeWM/events{/privacy}","received_events_url":"https://api.github.com/users/awesomeWM/received_events","type":"Organization","site_admin":false},"repo":{"id":17378009,"name":"awesome","full_name":"awesomeWM/awesome","owner":{"login":"awesomeWM","id":6843364,"avatar_url":"https://avatars.githubusercontent.com/u/6843364?v=3","gravatar_id":"","url":"https://api.github.com/users/awesomeWM","html_url":"https://github.com/awesomeWM","followers_url":"https://api.github.com/users/awesomeWM/followers","following_url":"https://api.github.com/users/awesomeWM/following{/other_user}","gists_url":"https://api.github.com/users/awesomeWM/gists{/gist_id}","starred_url":"https://api.github.com/users/awesomeWM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesomeWM/subscriptions","organizations_url":"https://api.github.com/users/awesomeWM/orgs","repos_url":"https://api.github.com/users/awesomeWM/repos","events_url":"https://api.github.com/users/awesomeWM/events{/privacy}","received_events_url":"https://api.github.com/users/awesomeWM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awesomeWM/awesome","description":"awesome window manager","fork":false,"url":"https://api.github.com/repos/awesomeWM/awesome","forks_url":"https://api.github.com/repos/awesomeWM/awesome/forks","keys_url":"https://api.github.com/repos/awesomeWM/awesome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awesomeWM/awesome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awesomeWM/awesome/teams","hooks_url":"https://api.github.com/repos/awesomeWM/awesome/hooks","issue_events_url":"https://api.github.com/repos/awesomeWM/awesome/issues/events{/number}","events_url":"https://api.github.com/repos/awesomeWM/awesome/events","assignees_url":"https://api.github.com/repos/awesomeWM/awesome/assignees{/user}","branches_url":"https://api.github.com/repos/awesomeWM/awesome/branches{/branch}","tags_url":"https://api.github.com/repos/awesomeWM/awesome/tags","blobs_url":"https://api.github.com/repos/awesomeWM/awesome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awesomeWM/awesome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awesomeWM/awesome/git/refs{/sha}","trees_url":"https://api.github.com/repos/awesomeWM/awesome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awesomeWM/awesome/statuses/{sha}","languages_url":"https://api.github.com/repos/awesomeWM/awesome/languages","stargazers_url":"https://api.github.com/repos/awesomeWM/awesome/stargazers","contributors_url":"https://api.github.com/repos/awesomeWM/awesome/contributors","subscribers_url":"https://api.github.com/repos/awesomeWM/awesome/subscribers","subscription_url":"https://api.github.com/repos/awesomeWM/awesome/subscription","commits_url":"https://api.github.com/repos/awesomeWM/awesome/commits{/sha}","git_commits_url":"https://api.github.com/repos/awesomeWM/awesome/git/commits{/sha}","comments_url":"https://api.github.com/repos/awesomeWM/awesome/comments{/number}","issue_comment_url":"https://api.github.com/repos/awesomeWM/awesome/issues/comments{/number}","contents_url":"https://api.github.com/repos/awesomeWM/awesome/contents/{+path}","compare_url":"https://api.github.com/repos/awesomeWM/awesome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awesomeWM/awesome/merges","archive_url":"https://api.github.com/repos/awesomeWM/awesome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awesomeWM/awesome/downloads","issues_url":"https://api.github.com/repos/awesomeWM/awesome/issues{/number}","pulls_url":"https://api.github.com/repos/awesomeWM/awesome/pulls{/number}","milestones_url":"https://api.github.com/repos/awesomeWM/awesome/milestones{/number}","notifications_url":"https://api.github.com/repos/awesomeWM/awesome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awesomeWM/awesome/labels{/name}","releases_url":"https://api.github.com/repos/awesomeWM/awesome/releases{/id}","created_at":"2014-03-03T19:56:16Z","updated_at":"2015-02-27T12:21:31Z","pushed_at":"2015-02-26T21:46:38Z","git_url":"git://github.com/awesomeWM/awesome.git","ssh_url":"git@github.com:awesomeWM/awesome.git","clone_url":"https://github.com/awesomeWM/awesome.git","svn_url":"https://github.com/awesomeWM/awesome","homepage":"https://awesome.naquadah.org/","size":10463,"stargazers_count":214,"watchers_count":214,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":32,"forks":39,"open_issues":32,"watchers":214,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/155"},"html":{"href":"https://github.com/awesomeWM/awesome/pull/155"},"issue":{"href":"https://api.github.com/repos/awesomeWM/awesome/issues/155"},"comments":{"href":"https://api.github.com/repos/awesomeWM/awesome/issues/155/comments"},"review_comments":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/155/comments"},"review_comment":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/155/commits"},"statuses":{"href":"https://api.github.com/repos/awesomeWM/awesome/statuses/113febf3fb62301996ceae91efc9958768893f10"}}}}