Color

open class Color

Used to set colors of figures generated by CanvasGraphics framework

  • Undocumented

    Declaration

    Swift

    public static let black: Color
  • Undocumented

    Declaration

    Swift

    public static let white: Color
  • red

    Undocumented

    Declaration

    Swift

    public static let red: Color
  • Undocumented

    Declaration

    Swift

    public static let orange: Color
  • Undocumented

    Declaration

    Swift

    public static let yellow: Color
  • Undocumented

    Declaration

    Swift

    public static let green: Color
  • Undocumented

    Declaration

    Swift

    public static let blue: Color
  • Undocumented

    Declaration

    Swift

    public static let purple: Color
  • Sets the desired colour.

    To understand hue, saturation, and brightness, see this summary or this for more details.

    Declaration

    Swift

    public init(hue: Float, saturation: Float, brightness: Float, alpha: Float)

    Parameters

    hue

    Value between 0 and 360 describing hue

    saturation

    Value between 0 and 100 describing amount of saturation

    brightness

    Value between 0 and 100 describing brightness

    alpha

    Value between 0 and 100 describing opacity

  • Undocumented

    Declaration

    Swift

    public convenience init(hue: Int, saturation: Int, brightness: Int, alpha: Int)