Style your SDK
Diyalog SDK provides custom Diyalog style to your application, using Diyalog style customer can create own styled screen.
How to use custom style?#
First create object of DiyalogStyle class from your application class, and using that object you can access all property of DiyaLogStyle class.
- Diyalog style is optional. If customer don't wants to use custom style then SDK will use default style
Sample code:#
More options?#
Followings are styles parameters with the help of those parameters User can configure style within their Application:
Dark mode#
Set Main App in Dark Mode
Common View style#
Change all bacground colors in Diyalog SDK screens.
Diyalog TabBar Color#
Colors in Diyalog Views#
Text color in views#
Tint color in views#
This setting change all active text colors like:
- Color of all buttons and action buttons
- Selected UITabBarItem text color (if not set indiviudally)
- All UITable title and text colors (if not set indiviudally)
- Read Status tick color (if not set indiviudally)
- User presense status info color (if not set indiviudally)
Hint color in views#
This setting change secondary and passive text colors in views like :
- texts other than main texts (hint, label, date, pssive status informations.)
- Not selected UITabBarItem text color (if not set indiviudally)
- All UITable secondary elements text colors (if not set indiviudally)
- Send, delivered Status tick color (if not set indiviudally)
- Date text in Dailog lists (if not set indiviudally)
Separator color#
Selected Items color#
This setting set color for all selected items in views.
Switch buttons colors#
Navigation Bar#
Navigation Background colors#
Navigation Tint colors#
Navigation Bar Style#
Navigation Title color#
Search Bars#
Search bar background color#
Search bar input field background#
Search bar text color#
Search bar cancel button color#
Chat Screen Colors Settings#
Chat screen background color#
Received text message bubble background color#
Received text message bubble border color#
Received text message text color#
Received text message date color#
Received media message bubble background color#
Received media message date background color#
Received media message date text color#
Received media message date text color#
Sent media message bubble background color#
Sent text message bubble background color#
Sent text message bubble border color#
Sent text message text color#
Sent text message date color#
Sent media message date color#
New messages Separator background color#
Service Messages bubble color#
Voice message Slider Color#
Message Status tick colors#
Chat Actionsheet Settings#
Background color#
Tint Colors#
Camera Button Colors#
Lirary Button Colors#
Location Button Colors#
Contact Button Colors#
Cancel Button Colors#
Action Sheet Separator Colors#
Set all separator colors with
or you can set each action sheet separator colors individually
Call Background Colors#
Online Help Views Colors#
Style configuration reference#
SDK version: The property reference and typography below apply to Diyalog iOS SDK v5.14.0 and later.
DiyalogStyle lets your app re-brand the SDK's chat, conversation list, support (Online Help), settings and profile screens without forking or rebuilding the SDK. Through one configuration object you control colors, backgrounds, message bubbles, status indicators and typography (font scale and family), applied consistently across every SDK screen.
Entry point#
All styling is configured through the public style field of the DiyalogEngine singleton:
DiyalogStyle is a plain configuration object with a variable for every property. There is no builder or commit step: each assignment takes effect immediately and is read by the SDK the next time the relevant screen or view renders.
When to apply styling#
Apply style configuration once, as early as possible: typically in AppDelegate's application(_:didFinishLaunchingWithOptions:), alongside the other Diyalog SDK initialization calls and before any SDK screen is shown. Properties can also be updated later; the change appears the next time an affected screen is drawn.
Default value inheritance#
Most properties do not need an explicit value. When left unset, many of them inherit from a small set of foundation colors, mainly vcBgColor, vcTintColor and the base text colors (vcTextColor, vcHintColor). Setting a few foundation properties therefore re-skins a large part of the SDK UI.
| Foundation property | Typically inherited by |
|---|---|
vcTintColor | Navigation icons, selected tabs, active statuses, send buttons and user online indicators |
vcBgColor | Main view controllers, token fields, cell backgrounds and composer backgrounds |
vcTextColor | Dialog list titles, settings titles and chat messages |
vcSeparatorColor | List dividers across dialogs and contacts screens |
Properties that do not inherit from a foundation color use a fixed SDK default, listed per property in the tables below.
Typography is applied automatically#
Once the typography properties (customFontFamily, globalFontSizeScale) are set on DiyalogStyle, the SDK applies them to every text view it renders: chat bubbles, dialogs and list screens. Your app does not need to call any typography utility.
Getting started#
Minimal example: re-brand with a single primary color in your AppDelegate:
A more complete example, overriding chat and support-screen colors individually:
Property reference#
The tables below list the configurable DiyalogStyle properties, grouped by the screen area they affect. Assign values directly to the property on the style object.
Brand and global colors#
| Property | Type | Default | Description |
|---|---|---|---|
vcTintColor | UIColor | #5085cb | Primary brand color. Used for actions, tabs and navigation items. |
vcBgColor | UIColor | #FFFFFF | Application-wide default background color. |
vcDestructiveColor | UIColor | UIColor.red | Accent (destructive-style) color. |
navigationBgColor | UIColor | #F7F7F7 | Navigation bar / header background color. |
navigationTintColor | UIColor | #5085cb | Navigation bar icon color. |
navigationTitleColor | UIColor | #000000 (87% alpha) | Navigation bar title color. |
vcBackyardColor | UIColor | #EEEEEE | Secondary background panel (used in settings). |
vcStatusBarStyle | UIStatusBarStyle | .default | iOS status bar style. |
Base text and divider colors#
These foundation colors are used directly and are also the fallback for several screen-specific text colors.
| Property | Type | Default | Description |
|---|---|---|---|
vcTextColor | UIColor | #000000 (87% alpha) | Main text color of the app. |
vcHintColor | UIColor | #A4A4A4 | Secondary / hint / placeholder text color. |
vcSectionColor | UIColor | #5B5A60 | Header / footer text color in lists. |
vcSeparatorColor | UIColor | #D4D4D4 | UITableView separator color and borders. |
vcSelectedColor | UIColor | #D9D9D9 | UITableViewCell selected-state background. |
Conversation list (dialogs screen)#
| Property | Default | Description |
|---|---|---|
dialogTitleColor | Inherits vcTextColor | Contact / group name. |
dialogTextColor | Inherits dialogTitleColor (64% alpha) | Last-message preview text. |
dialogDateColor | Inherits vcHintColor | Last-message timestamp. |
dialogTextActiveColor | Inherits vcTextColor | "Typing..." indicator or active-state text. |
dialogCounterBgColor | #50A1D6 | Unread-count badge background. |
dialogCounterColor | #FFFFFF | Unread-count badge text. |
dialogStatusActive | Inherits chatStatusActive | Read message-state icon in the list. |
dialogStatusPassive | Inherits chatStatusPassive | Sent / delivered message-state icon. |
Chat / conversation screen#
| Property | Default | Description |
|---|---|---|
chatBgColor | #E7E0C4 (pattern image) | Base chat background color or pattern. |
chatTextBubbleOutColor | #D2FEFD | Outgoing message bubble background. |
chatTextBubbleOutBorderColor | #99E4E3 | Outgoing message bubble border. |
chatTextOutColor | chatTextColor | Outgoing message text color. |
chatTextBubbleInColor | #FFFFFF | Incoming message bubble background. |
chatTextBubbleInBorderColor | #CCCCCC | Incoming message bubble border. |
chatTextInColor | chatTextColor | Incoming message text color. |
chatTextDateOutColor | #000000 | Outgoing in-bubble timestamp color. |
chatTextDateInColor | #979797 | Incoming in-bubble timestamp color. |
chatDateBubbleColor | #2D394A | Date-separator label background. |
chatDateTextColor | #FFFFFF | Date-separator label text color. |
Text message delivery-state colors#
| Property | Default | Description |
|---|---|---|
chatStatusPassive | Inherits vcHintColor | Sent / delivered icon on outgoing messages. |
chatStatusActive | Inherits vcTintColor | Read (seen) icon on outgoing messages. |
chatStatusDanger | Inherits vcDestructiveColor | Failed-to-send or error icon. |
Media message delivery-state colors#
Equivalent state colors drawn over image, video and location message thumbnails.
| Property | Default | Description |
|---|---|---|
chatMediaDateBgInColor | #2D394A | Timestamp background over incoming media. |
chatMediaDateBgOutColor | #2D394A | Timestamp background over outgoing media. |
chatStatusMediaPassive | #FFFFFF | Sent / delivered icon over media. |
chatStatusMediaActive | #2ED3FD (chatReadMediaColor) | Read icon over media. |
chatStatusMediaDanger | Inherits chatStatusDanger | Failed icon over media. |
Message composer (send panel)#
| Property | Default | Description |
|---|---|---|
chatInputFieldBgColor | Inherits vcPanelBgColor | Composer outer container background. |
chatAttachColor | Inherits vcTintColor | Attachment (+) icon color. |
chatSendColor | Inherits vcTintColor | Send button color when enabled. |
chatSendDisabledColor | Inherits vcTintColor (64% alpha) | Send button color when disabled. |
microphoneButtonColor | #4B92E2 | Microphone / voice record button color. |
Online Help (support chat)#
| Property | Default | Description |
|---|---|---|
onlineHelpNavigationBackgroundColor | #FFFFFF | Support-chat navigation bar background. |
onlineHelpBackgroundColor | #FFFFFF | Support-chat screen background. |
onlineHelpNavigationBarTitleColor | #074E9A | Support-chat navigation bar title color. |
onlineHelpTextColor | #074E9A | Support-chat message text color. |
showOnlineHelpAvatarImage | true | Whether the support agent's avatar is shown. |
onlineHelpCustomAgentAvatarImg | agent_icon | Custom placeholder avatar for the support agent. |
onlineHelpToolBarTitleImage | nil | Logo / image shown in the navigation bar instead of a text title. |
onlineHelpWaitOnErrorImage | nil | Illustration shown if connecting to an agent fails. |
Settings, profile, group and contacts screens#
| Property | Default | Description |
|---|---|---|
contactTitleColor | Inherits vcTextColor | Alphabetical fast-scroll index letter. |
avatarLightBlue | Multiple presets | Presets for default user avatars. |
userOnlineColor | Inherits vcTintColor | Online-status indicator in lists. |
userOfflineColor | Inherits vcTextColor (54% alpha) | Offline-status indicator in lists. |
Typography#
Typography properties apply globally to SDK-rendered text and take effect automatically. No per-screen wiring is needed in your app.
| Property | Type | Default | Description |
|---|---|---|---|
globalFontSizeScale | CGFloat | 1.0 | Global text-size multiplier applied on top of each view's own text size. |
customFontFamily | String? | nil | Global font family name (e.g. "HelveticaNeue"). Use the PostScript name of your font for bundled .ttf / .otf files, or a valid system font name. |
Reference implementation#
The Diyalog iOS sample app shows a full styling setup driven by UserDefaults, so brand properties can be switched at runtime (for example for testing) and are loaded at app launch. In AppDelegate.swift:
This keeps styling declarative. In production apps these values usually come from a remote configuration or a hard-coded brand configuration struct before being mapped into DiyalogEngine.diyalogInstance().style.
Custom layouts#
DiyalogStyle controls colors and text styling of the existing SDK screens. To replace a UI structure entirely, such as presenting SDK alerts with your own view controller, see Custom Layouts. Most integrations only need DiyalogStyle.
Best practices#
- Start with the foundation colors (
vcTintColor,vcBgColor,vcTextColor,vcHintColor). Through inheritance they cover most SDK screens before any screen-specific override is needed. - Apply styling once, early in
AppDelegate'sdidFinishLaunchingWithOptions, before any SDK view controller is created, so the style loads correctly without a visible restyle flash. - Custom font families: when using
customFontFamilywith a bundled font (.ttf/.otf), add the font to your Xcode project, include it in the target's "Copy Bundle Resources", and register it inInfo.plistunderUIAppFonts("Fonts provided by application"). Pass the exact PostScript name tocustomFontFamily. - Re-test message delivery-state colors (pending / sent / delivered / read / error) after any rebrand. They are functional status indicators, not just decoration, and must stay visually distinct.
- Typography changes (
globalFontSizeScale,customFontFamily) apply globally; check them against the longest strings in your supported languages to avoid truncation.
For styling properties not covered here, or to request an extension of the DiyalogStyle API for a specific branding need, contact the Diyalog SDK integration team.