Colors and Themes

Colors and Themes

To ensure visual consistency with your fan application, the TIXNGOSDK supports fully customizable color palettes for both light and dark themes.

Supported Themes

  • lightTheme: Configured via SDKTheme()

  • darkTheme: Configured via SDKTheme() (optional)

Use Cases

  1. Initialization-time Theme Setup
    Define custom themes during SDK initialization to establish light/dark color palettes from the start.
    ➤ Example: initialization method (Set theme and darkTheme as part of SDK configuration)

private func configTixngoSDK() {     // lightTheme         let theme = SDKTheme(font: "Inter",                              colors: SDKColor(primary100: <#T##UIColor?#>,                                               primary200: <#T##UIColor?#>,                                               primary300: <#T##UIColor?#>,                                               primary400: <#T##UIColor?#>,                                               primary500: <#T##UIColor?#>,                                               primary600: <#T##UIColor?#>,                                               primary700: <#T##UIColor?#>,                                               primary800: <#T##UIColor?#>,                                               branding100: <#T##UIColor?#>,                                               branding200: <#T##UIColor?#>,                                               branding300: <#T##UIColor?#>,                                               success100: <#T##UIColor?#>,                                               success200: <#T##UIColor?#>,                                               destructive100: <#T##UIColor?#>,                                               destructive200: <#T##UIColor?#>,                                               gradient100Begin: <#T##UIColor?#>,                                               gradient100End: <#T##UIColor?#>,                                               info100: <#T##UIColor?#>)         )                    // darkTheme         let darkTheme = SDKTheme(font: "Inter",                              colors: SDKColor(primary100: <#T##UIColor?#>,                                               primary200: <#T##UIColor?#>,                                               primary300: <#T##UIColor?#>,                                               primary400: <#T##UIColor?#>,                                               primary500: <#T##UIColor?#>,                                               primary600: <#T##UIColor?#>,                                               primary700: <#T##UIColor?#>,                                               primary800: <#T##UIColor?#>,                                               branding100: <#T##UIColor?#>,                                               branding200: <#T##UIColor?#>,                                               branding300: <#T##UIColor?#>,                                               success100: <#T##UIColor?#>,                                               success200: <#T##UIColor?#>,                                               destructive100: <#T##UIColor?#>,                                               destructive200: <#T##UIColor?#>,                                               gradient100Begin: <#T##UIColor?#>,                                               gradient100End: <#T##UIColor?#>,                                               info100: <#T##UIColor?#>)                    let config = TixngoConfiguration(isEnableScreenshotSSK: true,                                          isEnableDebug: true,                                          defaultEnv: TixngoEnv.val,                                          isEnableWallet: false,                                          isCheckAppStatus: false,                                          supportLanguages: [.en, .de ],                                          defaultLanguage: .en,                                          theme: theme, // LIGHT mode                                          darkTheme: darkTheme, // DARK mode                                          appId: "io.tixngo.app.sdk",                                          config: nil                                     )         TixngoSDK.shared.initialized(config: config, delegate: self) }
  1. Runtime Theme Palette Updates
    Change the color palette dynamically without restarting the app.
    ➤ Use changeTheme(theme, darkTheme) to override the initial configuration.

    public final func changeTheme(theme: TixngoTheme?, darkTheme: TixngoTheme?)
  2. Runtime Theme Type Switching
    Toggle between system, light, or dark appearance modes at runtime.
    ➤ Use SDKThemeType.system, SDKThemeType.light, or SDKThemeType.dark

    public func switchTheme(type: SDKThemeType = .system)

Behaviors

  • If both theme (light mode) and darkTheme (dark mode) are provided during initialization:

    • The SDK will automatically follow the operating system's theme setting.

  • If darkTheme is not provided, the SDK will only support light mode by default.

  • Calling changeTheme(...) at runtime will override any previously set configuration.

Theme Type Options

enum SDKThemeType { case system case light case dark }

Example Scenarios:

  • Example 1: Initialization method with light/dark themes

  • Example 2: Runtime theme palette change

  • Example 3: Switch between light/dark/system mode

For best visual results, define your themes using TIXNGO’s branding guidelines and test for readability across both modes.

Colors mapping 

Customization Limitations

Despite extensive support for colors and themes, the following limitations apply:

  • The QR code background on ticket screens is intentionally not customizable in dark mode. This ensures readability and access control compliance in stadiums and venues.

  • Light/Dark themes must be designed within TIXNGO’s mobile design system constraints. Extensive rebranding is not supp

AppIcon

The appIcon parameter in TixngoManager.initialise() is used in the “thank you banner” in the past ticket menu. If set to null, the default TIXNGO icon will be used.

image-20250703-073525.png

 

Summary

Feature

Supported

Notes

Feature

Supported

Notes

Light/Dark Theme

Yes

Runtime and initialization support

Runtime Theme Switching

Yes

Via SDK function changeTheme(...)

QR Code Background Override

No

Locked for operational/security compliance

 

 

© TIXNGO 2023 - Login