ThemeColors

public struct ThemeColors

A struct that defines all semantic colors used across the UI theme.

Colors follow the Material Design 3 specification and are resolved from a Theme. These values can be accessed via environment using @Environment(\.appTheme).colors or via subscript using a ColorToken.

Primary

  • Primary brand color. Used for filled buttons, toggles, sliders, and active states.

    Declaration

    Swift

    public let primary: Color
  • Foreground color for content displayed on top of the primary color. Used in filled buttons, icons, and text on primary.

    Declaration

    Swift

    public let onPrimary: Color
  • A container version of primary. Used for tonal buttons and cards.

    Declaration

    Swift

    public let primaryContainer: Color
  • Foreground color for content on primaryContainer.

    Declaration

    Swift

    public let onPrimaryContainer: Color

Secondary

  • Secondary brand color. Used for complementary accents and UI elements.

    Declaration

    Swift

    public let secondary: Color
  • Foreground color on secondary.

    Declaration

    Swift

    public let onSecondary: Color
  • Container version of secondary. Used in tonal buttons and backgrounds.

    Declaration

    Swift

    public let secondaryContainer: Color
  • Foreground color for content on secondaryContainer.

    Declaration

    Swift

    public let onSecondaryContainer: Color

Tertiary

  • Tertiary color used for less prominent accents and optional areas of UI.

    Declaration

    Swift

    public let tertiary: Color
  • Foreground color on tertiary.

    Declaration

    Swift

    public let onTertiary: Color
  • Container version of tertiary. Often used in tertiary or tonal button variants.

    Declaration

    Swift

    public let tertiaryContainer: Color
  • Foreground color for content on tertiaryContainer.

    Declaration

    Swift

    public let onTertiaryContainer: Color

Background

  • General background color for screens and surfaces.

    Declaration

    Swift

    public let background: Color
  • Foreground color for content placed directly on the background.

    Declaration

    Swift

    public let onBackground: Color

Error

  • The error color used to indicate critical states or invalid input. Used in buttons with role .destructive, text field error states, etc.

    Declaration

    Swift

    public let error: Color
  • Foreground color for content on top of the error color.

    Declaration

    Swift

    public let onError: Color
  • Container version of error. Used in buttons, alerts, and error highlights.

    Declaration

    Swift

    public let errorContainer: Color
  • Foreground color for content on errorContainer.

    Declaration

    Swift

    public let onErrorContainer: Color

Inverse

  • Surface color used for inverse components (e.g., bottom sheets, overlays).

    Declaration

    Swift

    public let inverseSurface: Color
  • Foreground color used on top of inverseSurface.

    Declaration

    Swift

    public let inverseOnSurface: Color
  • Primary brand color adapted for use on inverse surfaces.

    Declaration

    Swift

    public let inversePrimary: Color

Surface

  • Base surface color. Used for cards, sheets, dialogs, and containers.

    Declaration

    Swift

    public let surface: Color
  • Foreground content (text, icons) on top of surface.

    Declaration

    Swift

    public let onSurface: Color
  • A variant of the surface used for borders, dividers, and low-emphasis backgrounds.

    Declaration

    Swift

    public let surfaceVariant: Color
  • Foreground color for content on surfaceVariant.

    Declaration

    Swift

    public let onSurfaceVariant: Color
  • Used for dimmed surface backgrounds (e.g., navigation bars or background states).

    Declaration

    Swift

    public let surfaceDim: Color
  • Used for bright surface states (e.g., elevated containers).

    Declaration

    Swift

    public let surfaceBright: Color
  • The lowest elevation container surface (typically full-white or full-black).

    Declaration

    Swift

    public let surfaceContainerLowest: Color
  • Low-elevation container surface (1dp–2dp).

    Declaration

    Swift

    public let surfaceContainerLow: Color
  • Medium-elevation container surface (3dp–4dp).

    Declaration

    Swift

    public let surfaceContainer: Color
  • High-elevation container surface (6dp–8dp).

    Declaration

    Swift

    public let surfaceContainerHigh: Color
  • Highest-elevation container surface (above 8dp).

    Declaration

    Swift

    public let surfaceContainerHighest: Color

Outline & Utility