Instance Property

alpha

Returns the value of the alpha component associated with a color.

Declaration

var alpha: CGFloat { get }

Parameters

color

A color.

Return Value

An alpha intensity value in the range [0,1]. The value represents the opacity of the color.

See Also

Examining a Color

var colorSpace: CGColorSpace?

Returns the color space associated with a color.

var components: [CGFloat]?

Returns the values of the color components (including alpha) associated with a color.

var numberOfComponents: Int

Returns the number of color components (including alpha) associated with a color.

var pattern: CGPattern?

Returns the pattern associated with a color in a pattern color space.