{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/827","repository_url":"https://api.github.com/repos/PistonDevelopers/conrod","labels_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/827/comments","events_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/827/events","html_url":"https://github.com/PistonDevelopers/conrod/issues/827","id":176137733,"number":827,"title":"\"Autocolor\" chooses white text on white background in some cases","user":{"login":"Boscop","id":535593,"avatar_url":"https://avatars.githubusercontent.com/u/535593?v=3","gravatar_id":"","url":"https://api.github.com/users/Boscop","html_url":"https://github.com/Boscop","followers_url":"https://api.github.com/users/Boscop/followers","following_url":"https://api.github.com/users/Boscop/following{/other_user}","gists_url":"https://api.github.com/users/Boscop/gists{/gist_id}","starred_url":"https://api.github.com/users/Boscop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boscop/subscriptions","organizations_url":"https://api.github.com/users/Boscop/orgs","repos_url":"https://api.github.com/users/Boscop/repos","events_url":"https://api.github.com/users/Boscop/events{/privacy}","received_events_url":"https://api.github.com/users/Boscop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-09T23:40:10Z","updated_at":"2016-09-10T02:23:56Z","closed_at":null,"body":"When you start the all_widgets example and select 0.79 for blue and 0.71 for red and 0.0 for green, the widget containing the \"border width\" text will have white text on white background.\r\nWhen you increase the red value above that level, the envelope editors will have white lines/points on bright green (and the \"height\" widget has white text on bright green bg), making it less readable than black on bright green IMO.\r\n\r\n![conrod_bug_white_text](https://cloud.githubusercontent.com/assets/535593/18405897/95851b9c-76f6-11e6-8e31-7565bc9f4a3a.png)\r\n\r\nBtw, I'm not sure what the best way is to calculate a complemetary color, but this seems to be interesting:\r\nhttp://gamedev.stackexchange.com/questions/38536/given-a-rgb-color-x-how-to-find-the-most-contrasting-color-y"},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/comments/246082607","html_url":"https://github.com/PistonDevelopers/conrod/issues/827#issuecomment-246082607","issue_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/827","id":246082607,"user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T02:23:56Z","updated_at":"2016-09-10T02:23:56Z","body":"Currently we provide a `color.plain_contrast()` method which kind of does this - it returns white if the color's luminance is under 0.5, or black if the luminance is greater than 0.5. Most of the other widgets are using this in the example I believe, we might just have to change the number dialers to do this too.\r\n\r\nWe also provide a `color.complement()` which returns the color with the hue rotated 180 degrees. "}}
{"actor":{"display_login":"mitchmindtree"}}