ROMColor
public extension ROMColor
-
Represents a supported color space for random color generation.
See moreDeclaration
Swift
enum ColorSpace
-
Returns a random color created in the provided
colorSpace
andalpha
value.Declaration
Swift
static func random(inColorSpace colorSpace: ColorSpace = .default(), alpha: CGFloat? = nil) -> ROMColor
Parameters
colorSpace
The color space to create the random color in, the default is
ColorSpace.default()
alpha
The alpha value for the random color, nil means a random value in the range of
0.0 <= 1.0
Return Value
The random color