ColourStyle

public struct ColourStyle : CTColourStyle, Hashable

Model for setting up colour styling.

  • Declaration

    Swift

    public var colourType: ColourType
  • Declaration

    Swift

    public var colour: Color?
  • Declaration

    Swift

    public var colours: [Color]?
  • Declaration

    Swift

    public var stops: [GradientStop]?
  • Declaration

    Swift

    public var startPoint: UnitPoint?
  • Declaration

    Swift

    public var endPoint: UnitPoint?

Single colour

  • Single Colour

    Declaration

    Swift

    public init(colour: Color = Color(.red))

    Parameters

    colour

    Single Colour

Gradient colour

  • Gradient Colour Line

    Declaration

    Swift

    public init(
        colours: [Color] =  [Color(.red), Color(.blue)],
        startPoint: UnitPoint =  .leading,
        endPoint: UnitPoint =  .trailing
    )

    Parameters

    colours

    Colours for Gradient.

    startPoint

    Start point for Gradient.

    endPoint

    End point for Gradient.

Gradient with stops

  • Gradient with Stops Line

    Declaration

    Swift

    public init(
        stops: [GradientStop] = [GradientStop(color: Color(.red), location: 0.0)],
        startPoint: UnitPoint = .leading,
        endPoint: UnitPoint = .trailing
    )

    Parameters

    stops

    Colours and Stops for Gradient with stop control.

    startPoint

    Start point for Gradient.

    endPoint

    End point for Gradient.