{"action":"opened","issue":{"url":"https://api.github.com/repos/rugk/offline-qr-code/issues/92","repository_url":"https://api.github.com/repos/rugk/offline-qr-code","labels_url":"https://api.github.com/repos/rugk/offline-qr-code/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/rugk/offline-qr-code/issues/92/comments","events_url":"https://api.github.com/repos/rugk/offline-qr-code/issues/92/events","html_url":"https://github.com/rugk/offline-qr-code/issues/92","id":328629773,"node_id":"MDU6SXNzdWUzMjg2Mjk3NzM=","number":92,"title":"Make contrast/\"best color\" algorithm cleverer","user":{"login":"rugk","id":11966684,"node_id":"MDQ6VXNlcjExOTY2Njg0","avatar_url":"https://avatars3.githubusercontent.com/u/11966684?v=4","gravatar_id":"","url":"https://api.github.com/users/rugk","html_url":"https://github.com/rugk","followers_url":"https://api.github.com/users/rugk/followers","following_url":"https://api.github.com/users/rugk/following{/other_user}","gists_url":"https://api.github.com/users/rugk/gists{/gist_id}","starred_url":"https://api.github.com/users/rugk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rugk/subscriptions","organizations_url":"https://api.github.com/users/rugk/orgs","repos_url":"https://api.github.com/users/rugk/repos","events_url":"https://api.github.com/users/rugk/events{/privacy}","received_events_url":"https://api.github.com/users/rugk/received_events","type":"User","site_admin":false},"labels":[{"id":898703719,"node_id":"MDU6TGFiZWw4OTg3MDM3MTk=","url":"https://api.github.com/repos/rugk/offline-qr-code/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-01T19:10:33Z","updated_at":"2018-06-01T19:10:33Z","closed_at":null,"author_association":"OWNER","body":"## STR\r\nSet these options:\r\nQr code color: `#9494E2`\r\nbackground color: `#6B6B1D`\r\n\r\nWhat should happen: The \"best color\" should fulfill their own requirement and not yield an error/rwarning message.\r\n\r\n## Ideas for implementation\r\n1. Somehow get what value was last changed by the user, and change this value, instead of always the background color (if I remember correctly). Or just do it by random?\r\n1. Do not use exact contrast, but add some randomness.\r\n2. Self-check the color and generate a new random one if it does not match the contrast requirement.\r\n   Note: The loop must somehow make sure it does not run indefinitively. So stopping at some point would be possible, but does not actually solve our problem here. Better increase the \"randomness factor\" with each run. :smile: \r\n\r\nOr does someone can come up with some maths, for the \"best color\" here, so the algorithm does not have to guess in a loop?\r\n\r\n/cc @ENT8R "}}
{"actor":{"display_login":"rugk"}}