iOS Theming Overview

The Agentforce iOS SDK provides a comprehensive theming system that enables complete visual customization of the conversational AI interface. The theming system is built around a flexible, protocol-based architecture that supports dynamic theming, system integration, and custom brand implementations.

The theming system is built on a protocol-based architecture that provides maximum flexibility and customization:

The color system is built around semantic color tokens that provide consistent theming across all components:

  • surface1 / surface2: Primary view background colors
  • surfaceContainer1 / surfaceContainer2 / surfaceContainer3: Component container backgrounds
  • disabledContainer1 / disabledContainer2: Disabled component backgrounds
  • onSurface1 / onSurface2 / onSurface3: Text colors for different emphasis levels
  • onDisabled1 / onDisabled2: Text colors for disabled states
  • accent1 / accent2 / accent3 / accent4 / accent5: Interactive element colors
  • accentContainer1: Branded component container backgrounds
  • onAccent1: Text colors for accent containers
  • error1 / errorBase50 / errorContainer1 / onError1: Error state colors
  • successContainer1 / onSuccess1: Success state colors
  • feedbackWarning1 / feedbackWarningContainer1: Warning state colors
  • info1 / infoContainer1: Information state colors
  • border1 / border2: Decorative and functional border colors
  • borderDisabled1 / borderError1 / borderSuccess1: State-specific border colors
  • borderInverse2: Dark background border colors
  • brandBase50: Primary brand color for consistent branding

The SDK supports multiple theme modes for different use cases:

  • Optimized for: Light backgrounds and bright environments
  • Color Contrast: High contrast for readability
  • Brand Integration: Consistent with light-themed applications
  • Optimized for: Dark backgrounds and low-light environments
  • Eye Comfort: Reduced eye strain in dark environments
  • Modern Aesthetics: Contemporary dark theme design
  • Automatic Adaptation: Follows iOS system appearance preferences
  • User Preference: Respects user's system-wide theme choice
  • Dynamic Switching: Real-time theme changes based on system settings

Configure the default theme manager with your preferred theme mode for immediate theming support.

Implement custom theme managers that provide brand-specific colors and theming capabilities.

Create theme controllers that enable real-time theme switching between light, dark, and system modes.

  • Observable State: Real-time theme updates across all components
  • Automatic Propagation: Theme changes automatically update all UI elements
  • Performance Optimized: Efficient theme change handling without performance impact
  • iOS Appearance: Full integration with iOS appearance system
  • Accessibility: Support for accessibility preferences and high contrast modes
  • Dynamic Type: Integration with iOS Dynamic Type for text scaling
  • Brand Colors: Easy integration of custom brand colors
  • Logo Integration: Support for custom logos and branding elements
  • Consistent Theming: Unified theming across all SDK components
  • Brand Consistency: Maintain consistent branding across all conversational AI interfaces
  • User Experience: Provide familiar and comfortable visual experiences
  • Accessibility: Support for accessibility requirements and preferences
  • Flexibility: Easy customization for different use cases and requirements
  • Performance: Optimized theming system with minimal performance impact
  • Use Semantic Colors: Leverage semantic color tokens for consistent theming
  • Test All Modes: Verify theming across light, dark, and system modes
  • Accessibility: Ensure proper contrast ratios and accessibility compliance
  • Brand Integration: Maintain brand consistency while respecting user preferences
  • Performance: Use efficient theme switching to avoid UI lag