I have a custom made color in Storyboard. Is there a way to access it via code? Couldn't find anything on that topic.
I know there is a way to code custom-colors in Swift like this:
view.backgroundColor = UIColor(red: 1.00, green: 1.00, blue: 1.00, alpha: 1.00)
But getting my exact color with that method will take ages. Any suggestions?
UPDATE
I got it working with the RGB slider but my collectionView still appears white. That's my code:
let theCollectionView: UICollectionView = {
let v = UICollectionView(frame: CGRect.zero, collectionViewLayout: UICollectionViewFlowLayout())
v.translatesAutoresizingMaskIntoConstraints = false
v.backgroundColor = UIColor(red: 50, green: 215, blue: 200, alpha: 1)
v.contentInsetAdjustmentBehavior = .always
v.layer.cornerRadius = 30
return v
}()

UIColor init?(named:)initializer? - rmaddy255.0because the range is0...1not0...255:UIColor(red: 50.0/255.0, green: 215.0/255.0, blue: 200.0/255.0, alpha: 1)- vacawama