theme-white-label
The OUDS Theme White Label module provides a customizable theme implementation designed for white-labeling applications. It extends the Wireframe theme with the ability to customize some tokens values like colors or fonts while maintaining a neutral, clean foundation.
Purpose
While the core module provides the mechanisms to access the theme, and theme-contract defines what a theme is, theme-white-label defines a customizable theme for white-label applications.
White Label Use: This theme is specifically designed for applications that need to apply custom branding while keeping a clean, neutral base. Unlike the Wireframe theme which uses the Shantell Sans font, White Label uses the default font family by default.
Customization: It allows customization of font family through
WhiteLabelFontFamily, colors throughWhiteLabelColorScheme, border properties throughWhiteLabelBorders, and Material 3 colors throughWhiteLabelMaterialColorScheme.Implementation: It extends
WireframeThemeand allows overriding specific visual aspects without creating an entirely new theme from scratch.
Usage
To use the White Label theme in your application for custom branding, follow these steps:
1. Add the dependency
Ensure the theme-white-label module is included in your module's build.gradle.kts file in addition to the core module:
Kotlin DSL
dependencies {
// ...
implementation("com.orange.ouds.android:ouds-core:2.2.0")
implementation("com.orange.ouds.android:ouds-theme-white-label:2.2.0")
// ...
}Groovy DSL
dependencies {
// ...
implementation 'com.orange.ouds.android:ouds-core:2.2.0'
implementation 'com.orange.ouds.android:ouds-theme-white-label:2.2.0'
// ...
}2. Initialize and customize the Theme
In your application, you must provide the WhiteLabelTheme instance to the OudsTheme composable. This effectively "injects" the customized visual style into the OUDS system.
Use
OudsThemeas a replacement for the traditionalMaterialTheme.
Default Usage (Wireframe appearance with default font family)
OudsTheme(theme = WhiteLabelTheme()) {
// Use OUDS Android or Material components here
}Customization Example
val brandColorScheme = WhiteLabelColorScheme(
action = WhiteLabelColorScheme.Action(
enabled = OudsLightDarkColor(Color(0xFF1B5E20), Color(0xFF81C784))
),
content = WhiteLabelColorScheme.Content(
brandPrimary = OudsLightDarkColor(Color(0xFF1B5E20), Color(0xFF81C784))
),
surface = WhiteLabelColorScheme.Surface(
brand = WhiteLabelColorScheme.Surface.Brand(
primary = OudsLightDarkColor(Color(0xFF1B5E20), Color(0xFF81C784))
)
)
)
val brandMaterialColors = WhiteLabelMaterialColorScheme(
primary = OudsLightDarkColor(Color(0xFF1B5E20), Color(0xFF81C784)),
onPrimary = OudsLightDarkColor(Color.White, Color.Black)
)
val brandBorders = WhiteLabelBorders(
radius = WhiteLabelBorders.Radius(default = 12.0.dp)
)
val brandFont = WhiteLabelFontFamily { locale ->
FontFamily(
Font(R.font.brand_regular, FontWeight.Normal),
Font(R.font.brand_bold, FontWeight.Bold)
)
}
OudsTheme(
theme = WhiteLabelTheme(
identifier = "MyBrand",
colorScheme = brandColorScheme,
materialColorScheme = brandMaterialColors,
borders = brandBorders,
whiteLabelFontFamily = brandFont
)
) {
// Your fully branded app
}Relationship with other modules
| Module | Role | Analogy |
|---|---|---|
| global-raw-tokens | The Ingredients | "Flour", "Water", "Salt" |
| theme-contract | The Recipe Template | "A Cake Recipe" |
| theme-wireframe | The Base Recipe | "Basic Bread Recipe" |
| theme-white-label | The Customizable Recipe | "Basic Bread with Optional Toppings" |
| core | The Baker | "Making the customized bread available to eat" |
Tokens versions
This module extends the Wireframe theme and implements the design specifications versioned below:
| Android system | 1.2.0 |
| Wireframe brand | 2.8.0 |
| Wireframe core | 1.5.0 |
🤖 Note: The majority of the files in this module (specifically within the
tokenspackages) are automatically generated by Tokenator based on the design definitions.Any manual changes to these files will be lost during the next synchronization.