MimiColorBook
public struct MimiColorBook : Equatable
Collection of color properties that can be used to apply color variations to Mimi UI components.
-
Tint color that is used as the primary color for foreground elements such as buttons, switches and other interactive components.
Generally, this color should be the primary color of your brand and is highly prevalent across all UI elements.
Declaration
Swift
public private(set) var primaryTint: MimiHighlightableColor! { get }
-
Tint color that is used in conjunction with the primary tint to give contrast.
This color should not clash with your primary tint, but accompany it nicely.
Declaration
Swift
public private(set) var secondaryTint: MimiColor! { get }
-
Tint color that is applied to mostly background elements, such as the background of an untoggled switch or progress bar.
This color should clearly indicate a background context, and not clash with the other tints as much as possible.
Declaration
Swift
public private(set) var tertiaryTint: MimiHighlightableColor! { get }
-
Color used for primary elements that are typically interactive, such as the title labels within buttons which have a solid background.
This color should contrast nicely with your tint colors to provide a clear sense of interaction.
Declaration
Swift
public private(set) var primaryForeground: MimiHighlightableColor! { get }
-
Color used for secondary elements that are typically interactive, and appear on top of elements that are typically using background colors.
This color should contrast nicely with your background colors to provide a clear sense of interaction.
Declaration
Swift
public private(set) var secondaryForeground: MimiHighlightableColor! { get }
-
Color used as the primary background for main views. This will be primarily applied to views that take up the whole screen.
Generally, this color should contrast well with your tint colors and also be rather mute and plain.
Declaration
Swift
public private(set) var primaryBackground: MimiColor! { get }
-
Color used as the secondary background for main views.
This color should contrast well with your tint colors and the primary background.
Declaration
Swift
public private(set) var secondaryBackground: MimiColor! { get }
-
Color used for the background of non-primary views, such as modal views that don’t fill the screen. This includes alert views, navigation bars and tab bars.
This color should be similar to your primary background, but also discernable enough that a sense of context is clear. A user should be able to clearly see they are in a modal with the help of other built-in effects such as overlays and shadows.
Declaration
Swift
public private(set) var elevatedBackground: MimiColor! { get }
-
Color that is used to indicate a non-fatal warning or error.
This color can be used in a number of scenarios, such as the background color of an alert banner, or simply as the text color for a label describing an error. Therefore it is expected to be vivid and well contrasting against background elements.
Declaration
Swift
public private(set) var warning: MimiColor! { get }
-
Color that is used to indicate a fatal error or failure.
This color can be used in a number of scenarios, such as the background color of an alert banner, or simply as the text color for a label describing an error. Therefore it is expected to be vivid and well contrasting against background elements.
Declaration
Swift
public private(set) var error: MimiColor! { get }
-
Color that is used to indicate a success.
This color can be used in a number of scenarios, such as the background color of an alert banner, or simply as the text color for a label describing a success. Therefore it is expected to be vivid and well contrasting against background elements.
Declaration
Swift
public private(set) var success: MimiColor! { get }
-
Text color that is applied to all primary text elements.
This will mostly be applied to labels that are not control elements, and must contrast effectively with your background colors.
Declaration
Swift
public private(set) var primaryText: MimiHighlightableColor! { get }
-
Text color that is applied to all secondary / background text elements.
This will mostly be applied to labels that are not control elements, and must contrast effectively with your background colors.
Declaration
Swift
public private(set) var secondaryText: MimiHighlightableColor! { get }
-
Color used for the hearing test button’s background.
When the button is pressed, the color is also applied to the border of the button.
Declaration
Swift
public private(set) var hearingTestButtonBackground: MimiColor! { get }
-
Color used for the hearing test button’s text.
The color should be set with its highlighted version which is used for the button’s text when it’s pressed.
Declaration
Swift
public private(set) var hearingTestButtonText: MimiHighlightableColor! { get }
-
Color that is applied to Mimi’s Sound Personalization icon throughout the SDK.
Declaration
Swift
public private(set) var soundPersonalizationIcon: MimiColor! { get }
-
Color used for the left ear in the hearing test results visualization.
Declaration
Swift
public private(set) var earLeft: MimiColor! { get }
-
Color used for the right ear in the hearing test results visualization.
Declaration
Swift
public private(set) var earRight: MimiColor! { get }
-
init(primaryTint:secondaryTint:tertiaryTint:primaryForeground:secondaryForeground:primaryBackground:secondaryBackground:elevatedBackground:warning:error:success:primaryText:secondaryText:hearingTestButtonBackground:hearingTestButtonText:soundPersonalizationIcon:earLeft:earRight:)
Create a new color book with custom colors.
Declaration
Swift
public init(primaryTint: MimiHighlightableColor, secondaryTint: MimiColor, tertiaryTint: MimiHighlightableColor, primaryForeground: MimiHighlightableColor, secondaryForeground: MimiHighlightableColor, primaryBackground: MimiColor, secondaryBackground: MimiColor, elevatedBackground: MimiColor, warning: MimiColor, error: MimiColor, success: MimiColor, primaryText: MimiHighlightableColor, secondaryText: MimiHighlightableColor, hearingTestButtonBackground: MimiColor, hearingTestButtonText: MimiHighlightableColor, soundPersonalizationIcon: MimiColor, earLeft: MimiColor, earRight: MimiColor)
-
Default color book which utilizes the system color palette.
Declaration
Swift
public static var `default`: MimiColorBook { get }