NatColors

public struct NatColors

NatColors is a struct that has access to colors from the design system. This colors changes according with the current theme configured in the Design system.

All properties returns UIColor.

Color palette is separeted by groups listed bellow, but this class deliveries all colors in flat way without nested objected.

  • Primary: primary, onPrimary, primaryLight, onPrimaryLight, primaryDark, onPrimaryDark
  • Secundary: secondary, onSecondary, secondaryLight, onSecondaryLight, secondaryDark, onSecondaryDark
  • Surface: background, onBackground, surface, onSurface
  • Content: highlight, highEmphasis, mediumEmphasis, lowEmphasis
  • Feedback: success, onSuccess, warning, onWarning, alert, onAlert, link, onLink

Example of usage:

   let label = UILabel()
   label.backgroundColor = NatColors.primary
   label.textColor = NatColors.onPrimary

Requires

It’s necessary to configure the Design System with a theme or fatalError will be raised.

   DesignSystem().configure(with: AvailableTheme)

Primary

  • Undocumented

    Declaration

    Swift

    public static var primary: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onPrimary: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var primaryDark: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onPrimaryDark: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var primaryLight: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onPrimaryLight: UIColor { get }

Secundary

  • Undocumented

    Declaration

    Swift

    public static var secondary: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onSecondary: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var secondaryDark: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onSecondaryDark: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var secondaryLight: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onSecondaryLight: UIColor { get }

Surface

  • Undocumented

    Declaration

    Swift

    public static var background: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onBackground: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var surface: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onSurface: UIColor { get }

Content

  • Undocumented

    Declaration

    Swift

    public static var highlight: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var highEmphasis: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var mediumEmphasis: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var lowEmphasis: UIColor { get }

Feedback

  • Undocumented

    Declaration

    Swift

    public static var success: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onSuccess: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var warning: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onWarning: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var alert: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onAlert: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var link: UIColor { get }
  • Undocumented

    Declaration

    Swift

    public static var onLink: UIColor { get }