Precolor

public class Precolor

Precolor helps to manage color information for Rule styles. By using precolor you can define background and foreground text colors, and also make some interesting effects.

  • Initialize new Precolor with random color

    Declaration

    Swift

    public init()
  • Initialize new Precolor with provided color

    Declaration

    Swift

    public init(_ color: UIColor)
  • Initialize new Precolor with provided string color in hex format. For example #234 or #5463ff

    Declaration

    Swift

    public init(_ hexString: String)
  • Precolor will effect to background text color instead of foreground.

    Declaration

    Swift

    public func forBackgound() -> Precolor
  • Set percent which defines how much random color should effect original color.

    Declaration

    Swift

    public func random(_ percent: Int = 100) -> Precolor