ROMColor

public extension ROMColor

Public Types

  • Represents a supported color space for random color generation.

    See more

    Declaration

    Swift

    enum ColorSpace

Public Functions

  • Returns a random color created in the provided colorSpace and alpha 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