Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sceyt/sceyt-chat-android-uikit/llms.txt

Use this file to discover all available pages before exploring further.

The Sceyt Chat Android UIKit ships with a cohesive color system that flows through every component. Rather than hunting down individual style attributes, you control the global palette from a single SceytChatUIKitTheme object, and every screen — channel list, message thread, channel info, and more — picks up those colors automatically. This page covers how to adjust the accent color, define avatar background colors, change the default emoji reactions, and understand how light/dark mode works.

SceytChatUIKit.theme

The entry point for all color customization is SceytChatUIKit.theme, which holds a SceytChatUIKitTheme data class. The theme exposes a single colors property of type Colors.
data class SceytChatUIKitTheme(
    var colors: Colors = Colors()
)
Colors is itself a data class with @ColorRes integer fields for every semantic slot used across the UIKit:
PropertyDefault color resourcePurpose
primaryColorR.color.sceyt_color_primaryApp bars and navigation backgrounds
statusBarColorR.color.sceyt_color_status_barSystem status bar tint
accentColorR.color.sceyt_color_accentPrimary brand color — buttons, highlights
accentColor2accentColor5R.color.sceyt_color_accent_2_5Secondary accent palette
onPrimaryColorR.color.sceyt_color_on_primaryText/icons displayed on the primary color
backgroundColorR.color.sceyt_color_backgroundMain screen backgrounds
backgroundColorSecondaryR.color.sceyt_color_background_secondarySecondary backgrounds and dividers
backgroundColorSectionsR.color.sceyt_color_background_sectionsSection / card backgrounds
surface1Colorsurface3ColorR.color.sceyt_color_surface_1_3Elevated surfaces (bottom sheets, popovers)
overlayBackgroundColorR.color.sceyt_color_overlay_backgroundScrim overlays
overlayBackground2ColorR.color.sceyt_color_overlay_background_2Secondary scrim overlays
borderColorR.color.sceyt_color_borderSeparators and borders
iconSecondaryColorR.color.sceyt_color_icon_secondarySecondary icon tint
iconInactiveColorR.color.sceyt_color_icon_inactiveDisabled icon tint
textPrimaryColorR.color.sceyt_color_text_primaryPrimary body text
textSecondaryColorR.color.sceyt_color_text_secondarySecondary / caption text
textFootnoteColorR.color.sceyt_color_text_footnoteFootnote / hint text
warningColorR.color.sceyt_color_warningWarning states
successColorR.color.sceyt_color_greenSuccess states
attentionColorR.color.sceyt_color_attentionError and attention states

Setting the Accent Color

Because Colors is a data class, use copy() to override only the fields you need. Apply the change inside your Application.onCreate(), before any UI is shown.
import com.sceyt.chatuikit.SceytChatUIKit

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()

        // Initialize the UIKit first …
        SceytChatUIKit.initialize(
            context  = this,
            apiUrl   = "https://us-ohio-api.sceyt.com",
            appId    = "your-app-id",
            clientId = UUID.randomUUID().toString(),
            enableDatabase = true
        )

        // Then override the accent color:
        SceytChatUIKit.theme.colors = SceytChatUIKit.theme.colors.copy(
            accentColor = R.color.accentColor
        )
    }
}
You can update multiple slots in a single copy() call:
SceytChatUIKit.theme.colors = SceytChatUIKit.theme.colors.copy(
    accentColor           = R.color.brand_blue,
    accentColor2          = R.color.brand_blue_light,
    backgroundColor       = R.color.screen_background,
    textPrimaryColor      = R.color.text_primary
)
All color fields accept @ColorRes integer identifiers — not @ColorInt ARGB values. Resolve color resources with ContextCompat.getColor() only when a @ColorInt is explicitly required by a downstream API.

Avatar Background Colors

When a user or channel has no profile photo, the UIKit renders an initial-based avatar. The background color for that avatar is chosen from a rotating list. Customize the list by replacing SceytChatUIKit.config.defaultAvatarBackgroundColors with any AvatarBackgroundColors implementation. AvatarBackgroundColors is a functional interface:
fun interface AvatarBackgroundColors {
    fun getColors(context: Context): List<Int>
}
Provide your own colors:
import androidx.core.content.ContextCompat
import androidx.core.graphics.toColorInt
import com.sceyt.chatuikit.config.AvatarBackgroundColors

SceytChatUIKit.config.defaultAvatarBackgroundColors = AvatarBackgroundColors { context ->
    listOf(
        "#FFC107".toColorInt(),
        "#FF5722".toColorInt(),
        ContextCompat.getColor(context, R.color.pink),
        ContextCompat.getColor(context, R.color.red),
    )
}
The default implementation cycles through accentColor through accentColor5 from the active theme, so updating those theme slots is often sufficient without a custom provider.

Default Reactions

The emoji picker that appears on a long-press shows a row of quick-access reactions. Override the list via SceytChatUIKit.config.defaultReactions:
SceytChatUIKit.config.defaultReactions = listOf("😎", "👍", "❤️", "😂", "😮", "😢")
The list can contain any Unicode emoji string. Keep it to six items to match the default row layout and avoid truncation.

Light and Dark Mode

The UIKit automatically adapts to the system day/night mode because all built-in color resources are defined as <selector> resources with both night and default variants. No extra configuration is required — when the system switches to dark mode, the UIKit re-reads its color resources and updates accordingly.

Controlling the Mode Programmatically

You can force a specific appearance by setting the AppCompatDelegate night mode flag before the UIKit renders any view:
import androidx.appcompat.app.AppCompatDelegate

// Force dark mode
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)

// Force light mode
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)

// Follow the system setting (default)
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
Call AppCompatDelegate.setDefaultNightMode() before super.onCreate() in your Application class or before the first activity is created to avoid a recreation cycle.
If you supply custom @ColorRes values to SceytChatUIKit.theme.colors, make sure those resources also include night qualifier variants so that your overrides respond to dark mode correctly.

Full Initialization Example

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()

        SceytChatUIKit.initialize(
            context        = this,
            apiUrl         = "https://us-ohio-api.sceyt.com",
            appId          = "your-app-id",
            clientId       = UUID.randomUUID().toString(),
            enableDatabase = true
        )

        // Brand colors
        SceytChatUIKit.theme.colors = SceytChatUIKit.theme.colors.copy(
            accentColor     = R.color.brand_primary,
            accentColor2    = R.color.brand_secondary,
            backgroundColor = R.color.screen_bg
        )

        // Avatar palette
        SceytChatUIKit.config.defaultAvatarBackgroundColors = AvatarBackgroundColors { context ->
            listOf(
                ContextCompat.getColor(context, R.color.avatar_teal),
                ContextCompat.getColor(context, R.color.avatar_indigo),
                ContextCompat.getColor(context, R.color.avatar_rose),
            )
        }

        // Quick reactions
        SceytChatUIKit.config.defaultReactions = listOf("❤️", "👍", "😂", "😮", "🙏", "🔥")
    }
}

Build docs developers (and LLMs) love