Contents

copy(alpha:)

Creates a copy of an existing color, substituting a new alpha value.

Declaration

func copy(alpha: CGFloat) -> CGColor?

Parameters

  • alpha:

    A value that specifies the desired opacity of the copy. Values outside the range [0,1] are clamped to 0 or 1.

Return Value

A copy of the specified color, using the specified alpha value. In Objective-C, you’re responsible for releasing this object using CGColorRelease.

See Also

Creating Colors