
The following code in the created file Paste.Ĭonvenience init(hex: String, alpha: CGFloat = 1. It is recommended to make an extension once because it is quite convenient because it can be used in various situations.įile → New → File … → Select Swift File and enter an appropriate name such as UIColorHex in Save as → Decide the save destination and Create However, it is easier to specify by color code, so prepare the following extensions. Let rgba = UIColor(red: 129/255, green: 216/255, blue: 208/255, alpha: 1.0)Įxplain.textColor = rgba Specify the color code Write the following code in viewDidLoad // rgba = UIColor (red, green, blue, transparency) In such a case, it is convenient to use the RGB value as it is by using a code that divides the known RGB value by 255. Label.textColor = rgba Specify the color in RGB (0 to 255)Įven though I know the RGB value from 0 to 255, I don’t want to use it too much because it is troublesome to calculate and adjust each time if it is RGB (0 to 1.0) mentioned above. Set alpha to 0.0 to make Text transparent

CHANGING COLOR CIRCULAR TEXT SWIFT PUBLISHER 5 HOW TO
Specify the RGB value of Swift’s UI color from 0 to 1.0 instead of 255 steps. 0:00 2:42 How to Change the Shape of Text in Microsoft Publisher majorgeeks 36.9K subscribers 2.3K views 1 year ago Microsoft Publisher has a feature that allows you to change the shape. option also lets you change the background color of a text box.

Click on the color button to select a color.

Select Text color from Storyboard to see a list of other colors To activate the color fill tool, select the. Specify a color using System color weak var label: UILabel!
