UIColor
public extension UIColorUIColor extension.
- 
                  
                  Helper method to instantiate a UIColorobject any number of ways. E.g.With integer literals: UIColor(0xF00) UIColor(0xFF0000) UIColor(0xFF0000FF)Or string literals: UIColor("f00") UIColor("FF0000") UIColor("rgb(255, 0, 0)") UIColor("rgba(255, 0, 0, 0.15)")Or (preferably), if you want to be a bit more explicit: UIColor(.HEX(0xFF0000)) UIColor(.RGB(255, 0, 0)) UIColor(.RGBA(255, 0, 0, 0.5))If a provided value is invalid, the color will be white with an alpha value of 0. DeclarationSwift convenience init(_ color: ColorRepresentation)Parameterscolor
- 
                  
                  Undocumented DeclarationSwift convenience init(from string: String)
- 
                  
                  Returns a UIColorwith each color component ofselflightened byratio.DeclarationSwift func lighten(byRatio ratio: CGFloat) -> UIColor
- 
                  
                  Returns a UIColorwith each color component ofselfdarkened byratio.DeclarationSwift func darken(byRatio ratio: CGFloat) -> UIColor
- 
                  
                  A bool that indicates whether the color is dark. Note Formula for brightness derived from W3C Techniques For Accessibility Evaluation And Repair Tools, and formula for alpha-blending attributed to StackOverflow.DeclarationSwift var isDark: Bool { get }
 View on GitHub
            View on GitHub
           UIColor Extension Reference
      UIColor Extension Reference