CreationKit Documentation

Class Color​Manager

public final class ColorManager  

Colors from the design system.

You should use these rather than hardcoded UIColors from outside the system as these colors can change at anytime. Using these colors will also allow for users to manually switch their app color if need be if they require higher contrast or are color blind. These colors will also allow for app theming if need be.

Usage:

// Returns the associated primary color.
let color = ColorManager.Primary.threeHundred

Properties

shared

public static var shared  

The shared instance that can be used to update colors.

Primary

public static let Primary: ColorProvider.Type = Blue.self

The Primary color that will be displayed most frequently.

You should use this rather than the enum directly to support theming.

Neutral

public static let Neutral: ColorProvider.Type = Gray.self

The Neutral color that will be the second most used color. Its hues are used for strokes, backgrounds, text, etc.

You should use this rather than the enum directly to support theming.

Positive

public static let Positive: ColorProvider.Type = Green.self

The Positive color that is used to indicate success.

Negative

public static let Negative: ColorProvider.Type = Red.self

The Negative color that is used for error states or to draw attention to important information.

Warning

public static let Warning: ColorProvider.Type = Yellow.self

The Warning color that is used for warning states or to draw attention to important information

Accent​One

public static let AccentOne: ColorProvider.Type = Teal.self

An Accent Color

Accent​Two

public static let AccentTwo: ColorProvider.Type = Purple.self

An Accent Color

Accent​Three

public static let AccentThree: ColorProvider.Type = Pink.self

An Accent Color

primary

public var primary: UIColor = ColorManager.Primary.fiveHundred

secondary

public var secondary: UIColor = ColorManager.Primary.threeHundred

neutral

public var neutral: UIColor = ColorManager.Neutral.sevenHundred

positive

public var positive: UIColor = ColorManager.Positive.fiveHundred

negative

public var negative: UIColor = ColorManager.Negative.sixHundred

warning

public var warning: UIColor = ColorManager.Warning.threeHundred

accent​One

public var accentOne: UIColor = ColorManager.AccentOne.fiveHundred

accent​Two

public var accentTwo: UIColor = ColorManager.AccentTwo.fiveHundred

accent​Three

public var accentThree: UIColor = ColorManager.AccentThree.fiveHundred

accordion​Border

public lazy var accordionBorder: UIColor =  ColorManager.Neutral.oneHundred

accordion​Accessory​Enabled

public lazy var accordionAccessoryEnabled: UIColor = ColorManager.Neutral.fiveHundred

accordion​Text​Enabled

public lazy var accordionTextEnabled: UIColor = ColorManager.Neutral.sevenHundred

cta​Background​Color

public lazy var ctaBackgroundColor: ColorProvider.Type = Blue.self

cta​Critical​Background​Color

public lazy var ctaCriticalBackgroundColor: ColorProvider.Type = Red.self

button​Primary​Background

public lazy var buttonPrimaryBackground: UIColor = ctaBackgroundColor.fiveHundred

button​Primary​Pressed​Background

public lazy var buttonPrimaryPressedBackground: UIColor = ctaBackgroundColor.sixHundred

button​Primary​Disabled​Background

public lazy var buttonPrimaryDisabledBackground: UIColor = ColorManager.Neutral.fifty

button​Primary​Critical​Background

public lazy var buttonPrimaryCriticalBackground: UIColor = ctaCriticalBackgroundColor.fiveHundred

button​Primary​Critical​Pressed​Background

public lazy var buttonPrimaryCriticalPressedBackground: UIColor =
    ctaCriticalBackgroundColor.sixHundred

button​Primary​Critical​Disabled​Background

public lazy var buttonPrimaryCriticalDisabledBackground: UIColor = ctaCriticalBackgroundColor.oneHundred

button​Secondary​Border

public lazy var buttonSecondaryBorder: UIColor = ColorManager.Neutral.twoHundred

button​Secondary​Title

public lazy var buttonSecondaryTitle: UIColor = ctaBackgroundColor.fiveHundred

button​Secondary​Pressed​Background

public lazy var buttonSecondaryPressedBackground: UIColor = ColorManager.Neutral.oneHundred

button​Secondary​Disabled​Title

public lazy var buttonSecondaryDisabledTitle: UIColor = ColorManager.Neutral.twoHundred

button​Secondary​Critical​Title

public lazy var buttonSecondaryCriticalTitle: UIColor = ctaCriticalBackgroundColor.sixHundred

button​Secondary​Critical​Pressed​Background

public lazy var buttonSecondaryCriticalPressedBackground: UIColor =
    ctaCriticalBackgroundColor.oneHundred

button​Secondary​Critical​Pressed​Border

public lazy var buttonSecondaryCriticalPressedBorder: UIColor = ctaCriticalBackgroundColor.sixHundred

button​Secondary​Critical​Disabled​Title

public lazy var buttonSecondaryCriticalDisabledTitle: UIColor = ctaCriticalBackgroundColor.oneHundred

banner​Default​Provider

public lazy var bannerDefaultProvider: ColorProvider.Type = Blue.self

banner​Positive​Provider

public lazy var bannerPositiveProvider: ColorProvider.Type = Green.self

banner​Warning​Provider

public lazy var bannerWarningProvider: ColorProvider.Type = Yellow.self

banner​Negative​Provider

public lazy var bannerNegativeProvider: ColorProvider.Type = Red.self

banner​Default​Background

public lazy var bannerDefaultBackground: UIColor = bannerDefaultProvider.fiveHundred

banner​Positive​Background

public lazy var bannerPositiveBackground: UIColor = bannerPositiveProvider.fifty

banner​Negative​Background

public lazy var bannerNegativeBackground: UIColor = bannerNegativeProvider.fifty

banner​Warning​Background

public lazy var bannerWarningBackground: UIColor = bannerWarningProvider.fifty

banner​Default​Text

public lazy var bannerDefaultText: UIColor = .white

banner​Positive​Text

public lazy var bannerPositiveText: UIColor = bannerPositiveProvider.sevenHundred

banner​Warning​Text

public lazy var bannerWarningText: UIColor = bannerWarningProvider.sevenHundred

banner​Negative​Text

public lazy var bannerNegativeText: UIColor = bannerNegativeProvider.sevenHundred

banner​Button​Default​Text

public lazy var bannerButtonDefaultText: UIColor = .white

banner​Button​Positive​Text

public lazy var bannerButtonPositiveText: UIColor = bannerPositiveProvider.sixHundred

banner​Button​Warning​Text

public lazy var bannerButtonWarningText: UIColor = bannerWarningProvider.sixHundred

banner​Button​Negative​Text

public lazy var bannerButtonNegativeText: UIColor = bannerNegativeProvider.sixHundred

chip​Neutral​Color

public lazy var chipNeutralColor: ColorProvider.Type = Gray.self

chip​Primary​Color

public lazy var chipPrimaryColor: ColorProvider.Type = Blue.self

chip​Border

public lazy var chipBorder: UIColor = chipNeutralColor.fourHundred

chip​Primary​Content

public lazy var chipPrimaryContent: UIColor = chipPrimaryColor.threeHundred

chip​Neutral​Content

public lazy var chipNeutralContent: UIColor = chipNeutralColor.fiveHundred

content​State​Disabled

public lazy var contentStateDisabled: UIColor = chipNeutralColor.threeHundred

button​Tertiary​Critical​Pressed​Background

public lazy var buttonTertiaryCriticalPressedBackground: UIColor = ctaCriticalBackgroundColor.oneHundred

button​Tertiary​Pressed​Background

public lazy var buttonTertiaryPressedBackground: UIColor = ColorManager.Neutral.oneHundred

message​Incoming​Background

public lazy var messageIncomingBackground: UIColor = ColorManager.Primary.fifty

message​Outgoing​Background

public lazy var messageOutgoingBackground: UIColor = ColorManager.Primary.fiveHundred

message​Incoming​Text

public lazy var messageIncomingText: UIColor = ColorManager.Primary.sevenHundred

message​Outgoing​Text

public lazy var messageOutgoingText: UIColor = .white

message​Caption​Text

public lazy var messageCaptionText: UIColor = ColorManager.Neutral.fiveHundred

text​Color​Provider

public lazy var textColorProvider: ColorProvider.Type = ColorManager.Neutral

text​Body

public lazy var textBody: UIColor = textColorProvider.sevenHundred

tertiary​Text​Body

public lazy var tertiaryTextBody: UIColor = textColorProvider.fiveHundred

divider​Background

public lazy var dividerBackground: UIColor = ColorManager.Neutral.oneHundred

progress​Indicator​Color​Provider

public lazy var progressIndicatorColorProvider: ColorProvider.Type = ColorManager.Positive

progress​Indicator​Track

public lazy var progressIndicatorTrack = progressIndicatorColorProvider.oneHundred

progress​Indicator​Tint

public lazy var progressIndicatorTint = progressIndicatorColorProvider.fiveHundred

badge​Background

public lazy var badgeBackground: UIColor = ColorManager.Negative.fiveHundred

badge​Text

public lazy var badgeText: UIColor = .white