ColorModel

open class ColorModel : CustomStringConvertible

The ColorModel class provides simple mechanism for modeling color by components.

  • The UIColor associated with model.

    Declaration

    Swift

    open var color: UIColor { get set }
  • red

    The red component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var red: CGFloat { get set }
  • The green component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var green: CGFloat { get set }
  • The blue component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var blue: CGFloat { get set }
  • hue

    The hue component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var hue: CGFloat { get set }
  • The saturation component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var saturation: CGFloat { get set }
  • The brightness component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var brightness: CGFloat { get set }
  • The grayscale component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var white: CGFloat { get set }
  • The opacity component. Value between 0.0 and 1.0.

    Declaration

    Swift

    open var alpha: CGFloat { get set }
  • A textual representation of the color model.

    Declaration

    Swift

    open var description: String { get }
  • Creates and returns color model instance.

    Declaration

    Swift

    public init(color: UIColor)

    Parameters

    color

    The UIColor object to be used for modeling.

    Return Value

    ColorModel instance.