---
sourceDocument: Brazil API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/api-reference

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowChatThemeable protocol - iOS

# NowChatThemeable protocol - iOS {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of NowChatThemeable protocol - iOS

TheNowChatThemeableprotocol allows ServiceNow customers to customize the color scheme of chat pages within their iOS ServiceNow instance.
This is achieved by overriding default color properties through the protocol, enabling tailored branding and visual consistency in the chat UI.
Show full answer Show less  

## Key Features

* **NowChatThemeable Protocol:** Provides a color property that returns a `NowChatColoring` instance to define chat colors.
* **NowChatColoring Protocol:** Extends `NowUIColoring` and references default UI color variables used by themes.
* **Defining Colors:** Customers can define chat colors using the default Mobile SDK colors or by specifying custom colors for various UI elements such as brand, primary, secondary, text, backgrounds, separators, alerts, and shadows.
* **ChatTheme Structure:** Implements the `NowChatThemeable` protocol by encapsulating color definitions into a theme object, allowing easy management and instantiation of custom chat themes.

## Practical Application for ServiceNow Customers

* Create a struct conforming to `NowUIColoring` to define your custom color palette, either by leveraging the default colors or overriding them with brand-specific colors.
* Implement a `NowChatThemeable` struct that initializes its color property with your custom color palette.
* Instantiate your custom chat theme and pass it to the `NowChatService.makeChatUI()` method when creating your chat UI screen.
* Handle success and failure cases when creating the chat UI to ensure smooth integration.

## Key Outcomes

By implementing the **NowChatThemeable** protocol and providing a custom color configuration, you can fully control the visual appearance of your chat interface on iOS devices. This enhances user experience by aligning chat UI colors with your organization's branding and design standards, while utilizing ServiceNow's Mobile SDK capabilities for seamless theme application.  
The NowChatThemeable protocol provides properties that enable you to override the colors used within chat pages hosted on your ServiceNow instance.

    public protocol NowChatThemeable {
        var color: NowChatColoring { get }
    }

The [NowChatColoring](https://www.servicenow.com/docs/hOKHMfMboniueJW4qSvZhA#NowChatColoringiOSProtocol "The NowChatColoring protocol defines default colors for the elements in the Live Agent and Virtual Agent chat UI.") protocol contains NowUIColoring. This property is used to reference default color variables that NowWebThemeable can use.

For additional information on how to theme the UI, see [Use NowUIColoring to theme NowWebTheme and NowChatTheme](https://www.servicenow.com/docs/feiEin1FnsyH2qYn~GXmFw "The NowUIColoring interface contains all the colors used by all NowSDK modules.") in the Mobile SDK Developer Guide - iOS.

## Define ChatColors using default colors {#NowChatThemeableiOSProtocol__section_eqf_nk3_tzb}

    /// Sample structure for using default colors that comes with Mobile SDK.
    struct ChatColors: NowUIColoring {
    }

## Define ChatColors using custom colors {#NowChatThemeableiOSProtocol__section_zl2_tk3_tzb}

    /// Use Custom Colors with light theme
    struct ChatColors: NowUIColoring {
        private var defaultTheme: NowChatDefaultTheme {
            NowChatDefaultTheme(nowUITheme: NowUIDefaultTheme())
        }
     
        var brand: UIColor {
            lightBrand
        }
        var primary: UIColor {
            lightPrimary
        }
        var secondary: UIColor {
            lightSecondary
        }
        var textTertiary: UIColor {
            lightTextTertiary
        }
        var destructive: UIColor {
            lightDestructive
        }
        var textPrimary: UIColor {
            lightTextPrimary
        }
        var textSecondary: UIColor {
            lightTextSecondary
        }
        var textActionable: UIColor {
            lightTextActionable
        }
        var screenHeaderText: UIColor {
            lightScreenHeaderText
        }
        var backgroundPrimary: UIColor {
            lightBackgroundPrimary
        }
        var backgroundSecondary: UIColor {
            lightBackgroundSecondary
        }
        var backgroundTertiary: UIColor {
            lightBackgroundTertiary
        }
        var backgroundPrimaryActionable: UIColor {
            lightBackgroundPrimaryActionable
        }
        var backgroundSecondaryActionable: UIColor {
            lightBackgroundSecondaryActionable
        }
        var brandBackground: UIColor {
            lightBrandBackground
        }
        var linkPrimaryText: UIColor {
            lightLinkPrimary
        }
        var linkSecondary: UIColor {
            lightLinkSecondary
        }
        var separatorPrimary: UIColor {
            lightSeparatorPrimary
        }
        var separatorTertiary: UIColor {
            lightSeparatorTertiary
        }
        var borderTertiary: UIColor {
            lightBorderTertiary
        }
        var shadow: UIColor {
            lightShadow
        }
        var notification: UIColor {
            lightNotification
        }
        var alertCritical0: UIColor {
            lightAlertCritical0
        }
        var alertCritical3: UIColor {
            lightAlertCritical3
        }

        // Light Colors
        var lightBrand: UIColor { defaultTheme.color.nowUIColor.brand }
        var lightPrimary: UIColor { defaultTheme.color.nowUIColor.primary }
        var lightSecondary: UIColor { defaultTheme.color.nowUIColor.secondary }
        var lightDestructive: UIColor { defaultTheme.color.nowUIColor.destructive }
        var lightTextPrimary: UIColor { defaultTheme.color.nowUIColor.textPrimary }
        var lightTextSecondary: UIColor { defaultTheme.color.nowUIColor.textSecondary }
        var lightTextTertiary: UIColor { defaultTheme.color.nowUIColor.textTertiary }
        var lightTextActionable: UIColor { defaultTheme.color.nowUIColor.textActionable }
        var lightScreenHeaderText: UIColor { defaultTheme.color.nowUIColor.screenHeaderText }
        var lightBackgroundPrimary: UIColor { defaultTheme.color.nowUIColor.backgroundPrimary }
        var lightBackgroundSecondary: UIColor { defaultTheme.color.nowUIColor.backgroundSecondary }
        var lightBackgroundTertiary: UIColor { defaultTheme.color.nowUIColor.backgroundTertiary }
        var lightBackgroundPrimaryActionable: UIColor { defaultTheme.color.nowUIColor.backgroundPrimaryActionable
        }
        var lightBackgroundSecondaryActionable: UIColor { defaultTheme.color.nowUIColor.backgroundSecondaryActionable
        }
        var lightBrandBackground: UIColor { defaultTheme.color.nowUIColor.brandBackground }
        var lightLinkPrimary: UIColor { defaultTheme.color.nowUIColor.linkPrimaryText }
        var lightLinkSecondary: UIColor { defaultTheme.color.nowUIColor.linkSecondary }
        var lightSeparatorPrimary: UIColor { defaultTheme.color.nowUIColor.separatorPrimary }
        var lightSeparatorTertiary: UIColor { defaultTheme.color.nowUIColor.separatorTertiary }
        var lightBorderTertiary: UIColor { defaultTheme.color.nowUIColor.borderTertiary }
        var lightShadow: UIColor { defaultTheme.color.nowUIColor.shadow }
        var lightNotification: UIColor { defaultTheme.color.nowUIColor.notification }
        var lightAlertCritical0: UIColor { defaultTheme.color.nowUIColor.alertCritical0 }
        var lightAlertCritical3: UIColor { defaultTheme.color.nowUIColor.alertCritical3 }
    }

## Define ChatTheme structure with NowChatThemeable protocol {#NowChatThemeableiOSProtocol__section_axh_zk3_tzb}

    struct CarrascoChatTheme: NowChatThemeable {
        var color: NowChatColoring
        
        struct Color: NowChatColoring {
            var nowUIColor: NowUIColoring
        
            var backgroundPrimary: UIColor
            var backgroundSecondary: UIColor
            var backgroundPrimaryActionable: UIColor
            var backgroundSecondaryActionable: UIColor
            var brandBackground: UIColor
            var backgroundTertiary: UIColor
            var separatorPrimary: UIColor
            var separatorTertiary: UIColor
            var borderTertiary: UIColor
            var shadow: UIColor
            var linkSecondary: UIColor

            init(inputs: ChatColors) {
                nowUIColor = ThemeColor(inputs)
                
                backgroundPrimary = inputs.backgroundPrimary
                backgroundSecondary = inputs.backgroundSecondary
                backgroundTertiary = inputs.backgroundTertiary
                backgroundPrimaryActionable = inputs.backgroundPrimaryActionable
                backgroundSecondaryActionable = inputs.backgroundSecondaryActionable
                brandBackground = inputs.brandBackground
                separatorPrimary = inputs.separatorPrimary
                separatorTertiary = inputs.separatorTertiary
                borderTertiary = inputs.borderTertiary
                shadow = inputs.shadow
                linkSecondary = inputs.linkSecondary
            }
        }

        init(chatColors: ChatColors) {
            color = Color(inputs: chatColors)
        }
    }

## Instantiate ChatTheme object by passing ChatColor as input {#NowChatThemeableiOSProtocol__section_ebw_2l3_tzb}

    let chatTheme = CarrascoChatTheme(chatColors: ChatColors())

## Pass ChatTheme object to NowChatService.makeChatUI () {#NowChatThemeableiOSProtocol__section_mhd_hl3_tzb}

    func makeChatScreen() -> UIViewController? {
      guard let chatService = chatService else { return nil }
      let result = chatService.makeChatUI(theme: CarrascoChatTheme(chatColors: ChatColors()))
            
      switch result {
      case .success(let chatViewController):
        return chatViewController
      case .failure(let error):
        debugPrint("Chat screen creation failed with error: \(error)")
        return nil
      }
    }


