StyleColor
Represents a color as defined by the Mapbox Style Spec
-
A value from 0 to 255, as required by the Mapbox Style Spec
-
A value from 0 to 255, as required by the Mapbox Style Spec
-
A value from 0 to 255, as required by the Mapbox Style Spec
-
A value from 0 to 1, as required by the Mapbox Style Spec
-
Creates a
StyleColor
from individually-provided color components. Returns nil if any of the channel values are out of the supported ranges.
-
StyleColor
can 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. -
StyleColor
is always encoded to an rgba color stringThrows
Throws if the provided encoder does not allow encoding the rgba color string.