Find the color that you want by opening the color picker in Xcode for any property where you can select a color.
(See previous post on how to find the color picker.)
After you have your color go to the "Color Sliders" tab of the color picker (second tab) to get the red, green and blue values.
Then you plug those numbers into the UIColor constructor and divide them by 255.
(Swift 2.2)
(See previous post on how to find the color picker.)
After you have your color go to the "Color Sliders" tab of the color picker (second tab) to get the red, green and blue values.
Then you plug those numbers into the UIColor constructor and divide them by 255.
let color = UIColor(red: 106/255, green: 126/255, blue: 123/255, alpha: 1.0)
(Swift 2.2)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.