{"action":"created","issue":{"url":"https://api.github.com/repos/exyte/Macaw/issues/564","repository_url":"https://api.github.com/repos/exyte/Macaw","labels_url":"https://api.github.com/repos/exyte/Macaw/issues/564/labels{/name}","comments_url":"https://api.github.com/repos/exyte/Macaw/issues/564/comments","events_url":"https://api.github.com/repos/exyte/Macaw/issues/564/events","html_url":"https://github.com/exyte/Macaw/issues/564","id":431685265,"node_id":"MDU6SXNzdWU0MzE2ODUyNjU=","number":564,"title":"[Question] UIImage to UIColor to Color","user":{"login":"glennposadas","id":12502679,"node_id":"MDQ6VXNlcjEyNTAyNjc5","avatar_url":"https://avatars0.githubusercontent.com/u/12502679?v=4","gravatar_id":"","url":"https://api.github.com/users/glennposadas","html_url":"https://github.com/glennposadas","followers_url":"https://api.github.com/users/glennposadas/followers","following_url":"https://api.github.com/users/glennposadas/following{/other_user}","gists_url":"https://api.github.com/users/glennposadas/gists{/gist_id}","starred_url":"https://api.github.com/users/glennposadas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennposadas/subscriptions","organizations_url":"https://api.github.com/users/glennposadas/orgs","repos_url":"https://api.github.com/users/glennposadas/repos","events_url":"https://api.github.com/users/glennposadas/events{/privacy}","received_events_url":"https://api.github.com/users/glennposadas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ystrot","id":477610,"node_id":"MDQ6VXNlcjQ3NzYxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/477610?v=4","gravatar_id":"","url":"https://api.github.com/users/ystrot","html_url":"https://github.com/ystrot","followers_url":"https://api.github.com/users/ystrot/followers","following_url":"https://api.github.com/users/ystrot/following{/other_user}","gists_url":"https://api.github.com/users/ystrot/gists{/gist_id}","starred_url":"https://api.github.com/users/ystrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ystrot/subscriptions","organizations_url":"https://api.github.com/users/ystrot/orgs","repos_url":"https://api.github.com/users/ystrot/repos","events_url":"https://api.github.com/users/ystrot/events{/privacy}","received_events_url":"https://api.github.com/users/ystrot/received_events","type":"User","site_admin":false},"assignees":[{"login":"ystrot","id":477610,"node_id":"MDQ6VXNlcjQ3NzYxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/477610?v=4","gravatar_id":"","url":"https://api.github.com/users/ystrot","html_url":"https://github.com/ystrot","followers_url":"https://api.github.com/users/ystrot/followers","following_url":"https://api.github.com/users/ystrot/following{/other_user}","gists_url":"https://api.github.com/users/ystrot/gists{/gist_id}","starred_url":"https://api.github.com/users/ystrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ystrot/subscriptions","organizations_url":"https://api.github.com/users/ystrot/orgs","repos_url":"https://api.github.com/users/ystrot/repos","events_url":"https://api.github.com/users/ystrot/events{/privacy}","received_events_url":"https://api.github.com/users/ystrot/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2019-04-10T19:57:41Z","updated_at":"2019-04-11T09:08:37Z","closed_at":null,"author_association":"NONE","body":"Is this possible? What I did results to black color.\r\n\r\n```\r\nlet image = UIImage(named: \"pattern\")!\r\nlet color = UIColor(patternImage: image)\r\nshape.fill = Color.rgb(r: Int(color.redValue), g: Int(color.greenValue), b: Int(color.blueValue))\r\n```\r\n\r\n```\r\nextension UIColor {\r\n    var redValue: CGFloat{ return CIColor(color: self).red }\r\n    var greenValue: CGFloat{ return CIColor(color: self).green }\r\n    var blueValue: CGFloat{ return CIColor(color: self).blue }\r\n    var alphaValue: CGFloat{ return CIColor(color: self).alpha }\r\n}\r\n```\r\n\r\nI'm guessing it's not really possible, is it? Even the `color.redValue` yields 0.0.\r\nWhat I'm trying is to fill up the shape with a patterned png image."},"comment":{"url":"https://api.github.com/repos/exyte/Macaw/issues/comments/482033600","html_url":"https://github.com/exyte/Macaw/issues/564#issuecomment-482033600","issue_url":"https://api.github.com/repos/exyte/Macaw/issues/564","id":482033600,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MjAzMzYwMA==","user":{"login":"glennposadas","id":12502679,"node_id":"MDQ6VXNlcjEyNTAyNjc5","avatar_url":"https://avatars0.githubusercontent.com/u/12502679?v=4","gravatar_id":"","url":"https://api.github.com/users/glennposadas","html_url":"https://github.com/glennposadas","followers_url":"https://api.github.com/users/glennposadas/followers","following_url":"https://api.github.com/users/glennposadas/following{/other_user}","gists_url":"https://api.github.com/users/glennposadas/gists{/gist_id}","starred_url":"https://api.github.com/users/glennposadas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennposadas/subscriptions","organizations_url":"https://api.github.com/users/glennposadas/orgs","repos_url":"https://api.github.com/users/glennposadas/repos","events_url":"https://api.github.com/users/glennposadas/events{/privacy}","received_events_url":"https://api.github.com/users/glennposadas/received_events","type":"User","site_admin":false},"created_at":"2019-04-11T09:08:37Z","updated_at":"2019-04-11T09:08:37Z","author_association":"NONE","body":"Hi Yuri, I appreciate your fast reply. However, I couldn't find a class named ```Pattern``` in Macaw. 🧐"}}
{"actor":{"display_login":"glennposadas"}}