- 
                  
                  DeclarationSwift public var redComponent: Double
- 
                  
                  DeclarationSwift public var greenComponent: Double
- 
                  
                  DeclarationSwift public var blueComponent: Double
- 
                  
                  DeclarationSwift public var alphaComponent: Double
- 
                  
                  DeclarationSwift public init(red: Double, green: Double, blue: Double, alpha: Double)
- 
                  
                  DeclarationSwift public static let red: Color
- 
                  
                  DeclarationSwift public static let green: Color
- 
                  
                  DeclarationSwift public static let blue: Color
- 
                  
                  DeclarationSwift public static let black: Color
- 
                  
                  DeclarationSwift public static let white: Color
- 
                  
                  The maximum representable integer for each color component. DeclarationSwift private static let maxHex: Int
- 
                  
                  Initializes a new Colorinstance of given hexadecimal color string.Given string will be stripped from a single leading “#”, if applicable. Resulting string must met any of the following criteria: - Is a string with 8-characters and therefore a fully fledged hexadecimal
color representation including an alpha component. Given value will remain
untouched before conversion. Example: ffeebbaa
- Is a string with 6-characters and therefore a fully fledged hexadecimal color
representation excluding an alpha component. Given RGB color components will
remain untouched and an alpha component of 0xff(opaque) will be extended before conversion. Example:ffeebb->ffeebbff
- Is a string with 4-characters and therefore a shortened hexadecimal color
representation including an alpha component. Each single character will be
doubled before conversion. Example: feba->ffeebbaa
- Is a string with 3-characters and therefore a shortened hexadecimal color representation excluding an alpha component. Given RGB color character will be doubled and an alpha of component of - 0xff(opaque) will be extended before conversion. Example:- feb->- ffeebbff
 Throws .invalidColorif given string does not match any of the above mentioned criteria or is not a valid hex color.DeclarationSwift public init(hex string: String, leadingAlpha: Bool = false) throwsParametersstringThe hexadecimal color string. leadingAlphaIndicate whether given string should be treated as ARGB ( true) or RGBA (false)
- Is a string with 8-characters and therefore a fully fledged hexadecimal
color representation including an alpha component. Given value will remain
untouched before conversion. Example: 
- 
                  
                  Initializes a new Colorinstance of given hexadecimal color values.DeclarationSwift public init(hex color: Int, leadingAlpha: Bool = false)ParameterscolorThe hexadecimal color value, incl. red, green, blue and alpha leadingAlphaIndicate whether given code should be treated as ARGB ( true) or RGBA (false)
- 
                  
                  Sanitizes given hexadecimal color string (strips # and forms proper length). Throws .invalidColorif given string is not of proper lengthDeclarationSwift private static func sanitize(hex string: String, leadingAlpha: Bool) throws -> StringParametersstringThe hexadecimal color string to sanitize leadingAlphaIndicate whether given and returning string should be treated as ARGB ( true) or RGBA (false)Return ValueThe sanitized hexadecimal color string 
 View on GitHub
            View on GitHub
           Color Structure Reference
      Color Structure Reference