StyleColor
public struct StyleColor : Codable, EquatableRepresents a color as defined by the Mapbox Style Spec
- 
                  
                  A value from 0 to 255, as required by the Mapbox Style Spec DeclarationSwift public let red: Double
- 
                  
                  A value from 0 to 255, as required by the Mapbox Style Spec DeclarationSwift public let green: Double
- 
                  
                  A value from 0 to 255, as required by the Mapbox Style Spec DeclarationSwift public let blue: Double
- 
                  
                  A value from 0 to 1, as required by the Mapbox Style Spec DeclarationSwift public let alpha: Double
- 
                  
                  Creates a StyleColorfrom individually-provided color components. Returns nil if any of the channel values are out of the supported ranges.DeclarationSwift public init?(red: Double, green: Double, blue: Double, alpha: Double)ParametersredA value from 0 to 255, as required by the Mapbox Style Spec greenA value from 0 to 255, as required by the Mapbox Style Spec blueA value from 0 to 255, as required by the Mapbox Style Spec alphaA value from 0 to 1, as required by the Mapbox Style Spec 
- 
                  
                  Creates a StyleColorfrom aUIColorDeclarationSwift public init(_ color: UIColor)ParameterscolorA UIColorin the sRGB color space
- 
                  
                  StyleColorcan be decoded from an rgba expression or from an rgba color stringThrows Throws if neither an rgba expression nor an rbga color string could be decoded.DeclarationSwift public init(from decoder: Decoder) throwsParametersdecoderThe decoder from which the StyleColorwill attempt to decode an rgba expression or rgba color string
- 
                  
                  StyleColoris always encoded to an rgba color stringThrows Throws if the provided encoder does not allow encoding the rgba color string.DeclarationSwift public func encode(to encoder: Encoder) throwsParametersencoderThe encoder to which the rgba color string is encoded 
 StyleColor Structure Reference
        StyleColor Structure Reference