1

Whenever i try to put hex color code programatically in .swift file it always differ with from main.storyboard. Means i compare two buttons, one background button i put from code programmatically and second button background color i put from main.storyboard and both looks very different color

This is from Code

button.backgroundColor = UIColor(red: 255/255, green: 57/255, blue: 68/255, alpha: 1.0)

Main.storyboard

button background color : #FF3944
Mohammed Nabil
  • 137
  • 1
  • 6

1 Answers1

4

User DeviceRGB to get exact same color while giving color using storyboard

DeviceRGB

Added simulator screen shot here.

Smiluator