Color

class Color

Represent colors using built-in or custom formats, and give users options for selecting and applying colors

  • red

    property documentation (update this)

    Declaration

    var red: Double { get }
  • property documentation (update this)

    Declaration

    var green: Double { get }
  • property documentation (update this)

    Declaration

    var blue: Double { get }
  • property documentation (update this)

    Declaration

    var alpha: Double { get }
  • hex

    property documentation (update this)

    Declaration

    var hex: String { get }
  • property documentation (update this)

    Declaration

    var rgba: String { get }
  • The object’s description

    Declaration

    var description: String { get }
  • Compares two values for equality.

    The equals function is invoked using infix notation as in the following code snippet: lhs == rhs.

    Declaration

    func equals(_ lhs: Color) -> Bool

    Parameters

    lhs

    A value.

    rhs

    Another value.

    Return Value

    true if the lhs and rhs are equal, false otherwise.