1e41f4b71Sopenharmony_ci# Setting Theme Skinning
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## Overview
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ciApplications developed using the ArkTS-based declarative development paradigm can implement component theming, including local light/dark modes and dynamic skin changes. This feature does not support the C-API and Node-API, and it does not support theme settings for abilities and windows.
6e41f4b71Sopenharmony_ciThis document covers the following topics:
7e41f4b71Sopenharmony_ci- [Customizing Brand Colors](#customizing-brand-colors)
8e41f4b71Sopenharmony_ci- [Setting Custom Brand Colors for Application Components](#setting-custom-brand-colors-for-application-components)
9e41f4b71Sopenharmony_ci- [Setting a Custom Theme Style for Specific Application Pages](#setting-a-custom-theme-style-for-specific-application-pages)
10e41f4b71Sopenharmony_ci- [Setting Local Light and Dark Modes for Application Pages](#setting-local-light-and-dark-modes-for-application-pages)
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci## Customizing Brand Colors
14e41f4b71Sopenharmony_ciUse [CustomTheme](../reference/apis-arkui/js-apis-arkui-theme.md#customtheme) to tailor themes, by selectively overriding the properties you wish to modify; the unmodified properties will inherit from the system default settings, as described in [System Default Token Color Values](#system-default-token-color-values). The following is an example.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci  ```ts
17e41f4b71Sopenharmony_ci    import { CustomColors, CustomTheme } from '@kit.ArkUI'
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci    export class AppColors implements CustomColors {
20e41f4b71Sopenharmony_ci      // Custom brand color
21e41f4b71Sopenharmony_ci      brand: ResourceColor = '#FF75D9';
22e41f4b71Sopenharmony_ci    }
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci    export class AppTheme implements CustomTheme {
25e41f4b71Sopenharmony_ci      public colors: AppColors = new AppColors()
26e41f4b71Sopenharmony_ci    }
27e41f4b71Sopenharmony_ci    
28e41f4b71Sopenharmony_ci    export let gAppTheme: CustomTheme = new AppTheme()
29e41f4b71Sopenharmony_ci  ```
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci## Setting Custom Brand Colors for Application Components
32e41f4b71Sopenharmony_ci- Set the custom brand colors at the page entry point by executing [ThemeControl](../reference/apis-arkui/js-apis-arkui-theme.md#themecontrol) before the page builds.
33e41f4b71Sopenharmony_ciUse the [onWillApplyTheme](../reference/apis-arkui/arkui-ts/ts-custom-component-lifecycle.md#onwillapplytheme12) callback function to allow custom components to access the currently active **Theme** object.
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci  ```ts
36e41f4b71Sopenharmony_ci    import { Theme, ThemeControl } from '@kit.ArkUI'
37e41f4b71Sopenharmony_ci    import { gAppTheme } from './AppTheme'
38e41f4b71Sopenharmony_ci    
39e41f4b71Sopenharmony_ci    // Execute ThemeControl before the page builds.
40e41f4b71Sopenharmony_ci    ThemeControl.setDefaultTheme(gAppTheme)
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci    @Entry
43e41f4b71Sopenharmony_ci    @Component
44e41f4b71Sopenharmony_ci    struct DisplayPage {
45e41f4b71Sopenharmony_ci      @State menuItemColor: ResourceColor = $r('sys.color.background_primary')
46e41f4b71Sopenharmony_ci      
47e41f4b71Sopenharmony_ci      onWillApplyTheme(theme: Theme) {
48e41f4b71Sopenharmony_ci        this.menuItemColor = theme.colors.backgroundPrimary;
49e41f4b71Sopenharmony_ci      }
50e41f4b71Sopenharmony_ci    
51e41f4b71Sopenharmony_ci      build() {
52e41f4b71Sopenharmony_ci        Column() {
53e41f4b71Sopenharmony_ci          List({ space: 10 }) {
54e41f4b71Sopenharmony_ci            ListItem() {
55e41f4b71Sopenharmony_ci              Column({ space: '5vp' }) {
56e41f4b71Sopenharmony_ci                Text('Color mode')
57e41f4b71Sopenharmony_ci                  .margin({ top: '5vp', left: '14fp' })
58e41f4b71Sopenharmony_ci                  .width('100%')
59e41f4b71Sopenharmony_ci                Row() {
60e41f4b71Sopenharmony_ci                  Column() {
61e41f4b71Sopenharmony_ci                    Text('Light')
62e41f4b71Sopenharmony_ci                      .fontSize('16fp')
63e41f4b71Sopenharmony_ci                      .textAlign(TextAlign.Start)
64e41f4b71Sopenharmony_ci                      .alignSelf(ItemAlign.Center)
65e41f4b71Sopenharmony_ci                    Radio({ group: 'light or dark', value: 'light' })
66e41f4b71Sopenharmony_ci                      .checked(true)
67e41f4b71Sopenharmony_ci                  }
68e41f4b71Sopenharmony_ci                  .width('50%')
69e41f4b71Sopenharmony_ci
70e41f4b71Sopenharmony_ci                  Column() {
71e41f4b71Sopenharmony_ci                    Text('Dark')
72e41f4b71Sopenharmony_ci                      .fontSize('16fp')
73e41f4b71Sopenharmony_ci                      .textAlign(TextAlign.Start)
74e41f4b71Sopenharmony_ci                      .alignSelf(ItemAlign.Center)
75e41f4b71Sopenharmony_ci                    Radio({ group: 'light or dark', value: 'dark' })
76e41f4b71Sopenharmony_ci                  }
77e41f4b71Sopenharmony_ci                  .width('50%')
78e41f4b71Sopenharmony_ci                }
79e41f4b71Sopenharmony_ci              }
80e41f4b71Sopenharmony_ci              .width('100%')
81e41f4b71Sopenharmony_ci              .height('90vp')
82e41f4b71Sopenharmony_ci              .borderRadius('10vp')
83e41f4b71Sopenharmony_ci              .backgroundColor(this.menuItemColor)
84e41f4b71Sopenharmony_ci            }
85e41f4b71Sopenharmony_ci
86e41f4b71Sopenharmony_ci            ListItem() {
87e41f4b71Sopenharmony_ci              Column() {
88e41f4b71Sopenharmony_ci                Text('Brightness')
89e41f4b71Sopenharmony_ci                  .width('100%')
90e41f4b71Sopenharmony_ci                  .margin({ top: '5vp', left: '14fp' })
91e41f4b71Sopenharmony_ci                Slider({ value: 40, max: 100 })
92e41f4b71Sopenharmony_ci              }
93e41f4b71Sopenharmony_ci              .width('100%')
94e41f4b71Sopenharmony_ci              .height('70vp')
95e41f4b71Sopenharmony_ci              .borderRadius('10vp')
96e41f4b71Sopenharmony_ci              .backgroundColor(this.menuItemColor)
97e41f4b71Sopenharmony_ci            }
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ci            ListItem() {
100e41f4b71Sopenharmony_ci              Column() {
101e41f4b71Sopenharmony_ci                Row() {
102e41f4b71Sopenharmony_ci                  Column({ space: '5vp' }) {
103e41f4b71Sopenharmony_ci                    Text('Touch sensitivity')
104e41f4b71Sopenharmony_ci                      .fontSize('16fp')
105e41f4b71Sopenharmony_ci                      .textAlign(TextAlign.Start)
106e41f4b71Sopenharmony_ci                      .width('100%')
107e41f4b71Sopenharmony_ci                    Text('Increase the touch sensitivity of your screen' +
108e41f4b71Sopenharmony_ci                      ' for use with screen protectors')
109e41f4b71Sopenharmony_ci                      .fontSize('12fp')
110e41f4b71Sopenharmony_ci                      .fontColor(Color.Blue)
111e41f4b71Sopenharmony_ci                      .textAlign(TextAlign.Start)
112e41f4b71Sopenharmony_ci                      .width('100%')
113e41f4b71Sopenharmony_ci                  }
114e41f4b71Sopenharmony_ci                  .alignSelf(ItemAlign.Center)
115e41f4b71Sopenharmony_ci                  .margin({ left: '14fp' })
116e41f4b71Sopenharmony_ci                  .width('75%')
117e41f4b71Sopenharmony_ci    
118e41f4b71Sopenharmony_ci                  Toggle({ type: ToggleType.Switch, isOn: true })
119e41f4b71Sopenharmony_ci                    .margin({ right: '14fp' })
120e41f4b71Sopenharmony_ci                    .alignSelf(ItemAlign.Center)
121e41f4b71Sopenharmony_ci                }
122e41f4b71Sopenharmony_ci                .width('100%')
123e41f4b71Sopenharmony_ci                .height('80vp')
124e41f4b71Sopenharmony_ci              }
125e41f4b71Sopenharmony_ci              .width('100%')
126e41f4b71Sopenharmony_ci              .borderRadius('10vp')
127e41f4b71Sopenharmony_ci              .backgroundColor(this.menuItemColor)
128e41f4b71Sopenharmony_ci            }
129e41f4b71Sopenharmony_ci          }
130e41f4b71Sopenharmony_ci        }
131e41f4b71Sopenharmony_ci        .padding('10vp')
132e41f4b71Sopenharmony_ci        .backgroundColor('#dcdcdc')
133e41f4b71Sopenharmony_ci        .width('100%')
134e41f4b71Sopenharmony_ci        .height('100%')
135e41f4b71Sopenharmony_ci      }
136e41f4b71Sopenharmony_ci    }
137e41f4b71Sopenharmony_ci  ```
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ci- Within an ability, set [ThemeControl](../reference/apis-arkui/js-apis-arkui-theme.md#themecontrol) by calling [setDefaultTheme](../reference/apis-arkui/js-apis-arkui-theme.md#setdefaulttheme) in the **onWindowStageCreate()** API.
140e41f4b71Sopenharmony_ci
141e41f4b71Sopenharmony_ci  ```ts
142e41f4b71Sopenharmony_ci    import {AbilityConstant, UIAbility, Want } from '@kit.AbilityKit';
143e41f4b71Sopenharmony_ci    import { hilog } from '@kit.PerformanceAnalysisKit';
144e41f4b71Sopenharmony_ci    import { window, CustomColors, ThemeControl } from '@kit.ArkUI';
145e41f4b71Sopenharmony_ci
146e41f4b71Sopenharmony_ci    class AppColors implements CustomColors {
147e41f4b71Sopenharmony_ci      fontPrimary = 0xFFD53032
148e41f4b71Sopenharmony_ci      iconOnPrimary = 0xFFD53032
149e41f4b71Sopenharmony_ci      iconFourth = 0xFFD53032
150e41f4b71Sopenharmony_ci    }
151e41f4b71Sopenharmony_ci    
152e41f4b71Sopenharmony_ci    const abilityThemeColors = new AppColors();
153e41f4b71Sopenharmony_ci    
154e41f4b71Sopenharmony_ci    export default class EntryAbility extends UIAbility {
155e41f4b71Sopenharmony_ci      onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
156e41f4b71Sopenharmony_ci        hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
157e41f4b71Sopenharmony_ci      }
158e41f4b71Sopenharmony_ci    
159e41f4b71Sopenharmony_ci      onDestroy() {
160e41f4b71Sopenharmony_ci        hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
161e41f4b71Sopenharmony_ci      }
162e41f4b71Sopenharmony_ci    
163e41f4b71Sopenharmony_ci      onWindowStageCreate(windowStage: window.WindowStage) {
164e41f4b71Sopenharmony_ci        // Main window is created, set main page for this ability
165e41f4b71Sopenharmony_ci        hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
166e41f4b71Sopenharmony_ci      
167e41f4b71Sopenharmony_ci        windowStage.loadContent('pages/Index', (err, data) => {
168e41f4b71Sopenharmony_ci          if (err.code) {
169e41f4b71Sopenharmony_ci            hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
170e41f4b71Sopenharmony_ci            return;
171e41f4b71Sopenharmony_ci          }
172e41f4b71Sopenharmony_ci          hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
173e41f4b71Sopenharmony_ci          // Call setDefaultTheme in the onWindowStageCreate() API.
174e41f4b71Sopenharmony_ci          ThemeControl.setDefaultTheme({ colors: abilityThemeColors })
175e41f4b71Sopenharmony_ci          hilog.info(0x0000, 'testTag', '%{public}s', 'ThemeControl.setDefaultTheme done');
176e41f4b71Sopenharmony_ci        });
177e41f4b71Sopenharmony_ci      }
178e41f4b71Sopenharmony_ci    
179e41f4b71Sopenharmony_ci    }
180e41f4b71Sopenharmony_ci  ```
181e41f4b71Sopenharmony_ci
182e41f4b71Sopenharmony_ci![systemTheme](figures/systemTheme.png)
183e41f4b71Sopenharmony_ci
184e41f4b71Sopenharmony_ciNote: If the parameter for **setDefaultTheme** is undefined, refer to [System Default Token Color Values](#system-default-token-color-values) for the default color values associated with the tokens.
185e41f4b71Sopenharmony_ci
186e41f4b71Sopenharmony_ci## Setting a Custom Theme Style for Specific Application Pages
187e41f4b71Sopenharmony_ciUse [WithTheme](../reference/apis-arkui/arkui-ts/ts-container-with-theme.md) to apply the color scheme of a custom theme to the default styles of components within the scope. This way, the colors of components within the **WithTheme** scope align with the theme's color scheme.
188e41f4b71Sopenharmony_ciIn the example below, components within the scope are styled with a custom theme by using **WithTheme({ theme: this.myTheme })**. You can switch to a different theme style by updating **this.myTheme**.
189e41f4b71Sopenharmony_ciThe [onWillApplyTheme](../reference/apis-arkui/arkui-ts/ts-custom-component-lifecycle.md#onwillapplytheme12) callback function allows custom components to access the currently active **Theme** object.
190e41f4b71Sopenharmony_ci
191e41f4b71Sopenharmony_ci  ```ts
192e41f4b71Sopenharmony_ci    import { CustomColors, CustomTheme, Theme } from '@kit.ArkUI'
193e41f4b71Sopenharmony_ci
194e41f4b71Sopenharmony_ci    class AppColors implements CustomColors {
195e41f4b71Sopenharmony_ci      fontPrimary: ResourceColor = $r('app.color.brand_purple')
196e41f4b71Sopenharmony_ci      backgroundEmphasize: ResourceColor = $r('app.color.brand_purple')
197e41f4b71Sopenharmony_ci    }
198e41f4b71Sopenharmony_ci    
199e41f4b71Sopenharmony_ci    class AppColorsSec implements CustomColors {
200e41f4b71Sopenharmony_ci      fontPrimary: ResourceColor = $r('app.color.brand')
201e41f4b71Sopenharmony_ci      backgroundEmphasize: ResourceColor = $r('app.color.brand')
202e41f4b71Sopenharmony_ci    }
203e41f4b71Sopenharmony_ci    
204e41f4b71Sopenharmony_ci    class AppTheme implements CustomTheme {
205e41f4b71Sopenharmony_ci      public colors: AppColors = new AppColors()
206e41f4b71Sopenharmony_ci    }
207e41f4b71Sopenharmony_ci    
208e41f4b71Sopenharmony_ci    class AppThemeSec implements CustomTheme {
209e41f4b71Sopenharmony_ci      public colors: AppColors = new AppColorsSec()
210e41f4b71Sopenharmony_ci    }
211e41f4b71Sopenharmony_ci    
212e41f4b71Sopenharmony_ci    @Entry
213e41f4b71Sopenharmony_ci    @Component
214e41f4b71Sopenharmony_ci    struct DisplayPage {
215e41f4b71Sopenharmony_ci      @State customTheme: CustomTheme = new AppTheme()
216e41f4b71Sopenharmony_ci      @State message: string = 'Set a custom theme style for specific pages'
217e41f4b71Sopenharmony_ci      count = 0;
218e41f4b71Sopenharmony_ci    
219e41f4b71Sopenharmony_ci      build() {
220e41f4b71Sopenharmony_ci        WithTheme({ theme: this.customTheme }) {
221e41f4b71Sopenharmony_ci          Row(){
222e41f4b71Sopenharmony_ci            Column() {
223e41f4b71Sopenharmony_ci              Text('WithTheme')
224e41f4b71Sopenharmony_ci                .fontSize(30)
225e41f4b71Sopenharmony_ci                .margin({bottom: 10})
226e41f4b71Sopenharmony_ci              Text(this.message)
227e41f4b71Sopenharmony_ci                .margin({bottom: 10})
228e41f4b71Sopenharmony_ci              Button('Change Theme').onClick(() => {
229e41f4b71Sopenharmony_ci                this.count++;
230e41f4b71Sopenharmony_ci                if (this.count > 1) {
231e41f4b71Sopenharmony_ci                  this.count = 0;
232e41f4b71Sopenharmony_ci                }
233e41f4b71Sopenharmony_ci                switch (this.count) {
234e41f4b71Sopenharmony_ci                  case 0:
235e41f4b71Sopenharmony_ci                    this.customTheme = new AppTheme();
236e41f4b71Sopenharmony_ci                    break;
237e41f4b71Sopenharmony_ci                  case 1:
238e41f4b71Sopenharmony_ci                    this.customTheme = new AppThemeSec();
239e41f4b71Sopenharmony_ci                    break;
240e41f4b71Sopenharmony_ci                }
241e41f4b71Sopenharmony_ci              })
242e41f4b71Sopenharmony_ci            }
243e41f4b71Sopenharmony_ci            .width('100%')
244e41f4b71Sopenharmony_ci          }
245e41f4b71Sopenharmony_ci          .height('100%')
246e41f4b71Sopenharmony_ci          .width('100%')
247e41f4b71Sopenharmony_ci        }
248e41f4b71Sopenharmony_ci      }
249e41f4b71Sopenharmony_ci    }
250e41f4b71Sopenharmony_ci  ```
251e41f4b71Sopenharmony_ci
252e41f4b71Sopenharmony_ci![customTheme](figures/customTheme.gif)
253e41f4b71Sopenharmony_ci
254e41f4b71Sopenharmony_ci## Setting Local Light and Dark Modes for Application Pages
255e41f4b71Sopenharmony_ciUse [WithTheme](../reference/apis-arkui/arkui-ts/ts-container-with-theme.md) to set light and dark modes. [ThemeColorMode](../reference/apis-arkui/arkui-ts/ts-appendix-enums.md#themecolormode10) offers three options: **ThemeColorMode.SYSTEM** for following the system setting, **ThemeColorMode.LIGHT** for light mode, and **ThemeColorMode.DARK** for dark mode.<br>
256e41f4b71Sopenharmony_ciWithin the **WithTheme** scope, component styles adapt to the specified light or dark color mode by accessing the corresponding system and application resource values, and the color schemes of components are activated according to the chosen color mode.<br>
257e41f4b71Sopenharmony_ciIn the example below, components within the scope are set to dark mode using **WithTheme({ colorMode: ThemeColorMode.DARK })**.
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ciTo enable light and dark modes, add a **dark.json** resource file for the modes to take effect.
260e41f4b71Sopenharmony_ci
261e41f4b71Sopenharmony_ci![resources_dark](figures/resources_dark.png)
262e41f4b71Sopenharmony_ci
263e41f4b71Sopenharmony_ciExample of the **dark.json** file content:
264e41f4b71Sopenharmony_ci  ```ts
265e41f4b71Sopenharmony_ci    {
266e41f4b71Sopenharmony_ci      "color": [
267e41f4b71Sopenharmony_ci        {
268e41f4b71Sopenharmony_ci          "name": "start_window_background",
269e41f4b71Sopenharmony_ci          "value": "#FFFFFF"
270e41f4b71Sopenharmony_ci        }
271e41f4b71Sopenharmony_ci      ]
272e41f4b71Sopenharmony_ci    }
273e41f4b71Sopenharmony_ci  ```
274e41f4b71Sopenharmony_ci
275e41f4b71Sopenharmony_ci  ```ts
276e41f4b71Sopenharmony_ci    @Entry
277e41f4b71Sopenharmony_ci    @Component
278e41f4b71Sopenharmony_ci    struct DisplayPage {
279e41f4b71Sopenharmony_ci      @State message: string = 'Hello World';
280e41f4b71Sopenharmony_ci      @State colorMode: ThemeColorMode = ThemeColorMode.DARK;
281e41f4b71Sopenharmony_ci
282e41f4b71Sopenharmony_ci      build() {
283e41f4b71Sopenharmony_ci        WithTheme({ colorMode: this.colorMode }) {
284e41f4b71Sopenharmony_ci          Row() {
285e41f4b71Sopenharmony_ci            Column() {
286e41f4b71Sopenharmony_ci              Text(this.message)
287e41f4b71Sopenharmony_ci                .fontSize(50)
288e41f4b71Sopenharmony_ci                .fontWeight(FontWeight.Bold)
289e41f4b71Sopenharmony_ci              Button('Switch ColorMode').onClick(() => {
290e41f4b71Sopenharmony_ci                if (this.colorMode === ThemeColorMode.LIGHT) {
291e41f4b71Sopenharmony_ci                  this.colorMode = ThemeColorMode.DARK;
292e41f4b71Sopenharmony_ci                } else if (this.colorMode === ThemeColorMode.DARK) {
293e41f4b71Sopenharmony_ci                  this.colorMode = ThemeColorMode.LIGHT;
294e41f4b71Sopenharmony_ci                }
295e41f4b71Sopenharmony_ci              })
296e41f4b71Sopenharmony_ci            }
297e41f4b71Sopenharmony_ci            .width('100%')
298e41f4b71Sopenharmony_ci          }
299e41f4b71Sopenharmony_ci          .backgroundColor($r('sys.color.background_primary'))
300e41f4b71Sopenharmony_ci          .height('100%')
301e41f4b71Sopenharmony_ci          .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START])
302e41f4b71Sopenharmony_ci        }
303e41f4b71Sopenharmony_ci      }
304e41f4b71Sopenharmony_ci    }
305e41f4b71Sopenharmony_ci  ```
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ci![lightDarkMode](figures/lightDarkMode.png)
308e41f4b71Sopenharmony_ci
309e41f4b71Sopenharmony_ci## System Default Token Color Values
310e41f4b71Sopenharmony_ci
311e41f4b71Sopenharmony_ci| Token                                      | Category| Light |           | Dark    |                                              |
312e41f4b71Sopenharmony_ci|--------------------------------------------|-----| --- |-----------| ------- | -------------------------------------------- |
313e41f4b71Sopenharmony_ci| theme.colors.brand                         | Brand color.|#ff0a59f7| ![](figures/ff0a59f7.png "#ff0a59f7") |#ff317af7|![](figures/ff317af7.png "#ff317af7")|
314e41f4b71Sopenharmony_ci| theme.colors.warning                       | Alert color.|#ffe84026| ![](figures/ffe84026.png "#ffe84026") |#ffd94838|![](figures/ffd94838.png "#ffd94838")|
315e41f4b71Sopenharmony_ci| theme.colors.alert                         | Warning color.|#ffed6f21| ![](figures/ffed6f21.png "#ffed6f21") |#ffdb6b42|![](figures/ffdb6b42.png "#ffdb6b42")|
316e41f4b71Sopenharmony_ci| theme.colors.confirm                       | Confirmation color.|#ff64bb5c| ![](figures/ff64bb5c.png "#ff64bb5c") |#ff5ba854|![](figures/ff5ba854.png "#ff5ba854")|
317e41f4b71Sopenharmony_ci| theme.colors.fontPrimary                   | Primary text color.| #e5000000 | ![](figures/e5000000.png "#e5000000") |#e5ffffff|![](figures/e5ffffff.png "#e5ffffff")|
318e41f4b71Sopenharmony_ci| theme.colors.fontSecondary                 | Secondary text color.| #99000000 | ![](figures/99000000.png "#99000000") |#99ffffff|![](figures/99ffffff.png "#99ffffff")|
319e41f4b71Sopenharmony_ci| theme.colors.fontTertiary                  | Tertiary text color.| #66000000 | ![](figures/66000000.png "#66000000") |#66ffffff|![](figures/66ffffff.png "#66ffffff")|
320e41f4b71Sopenharmony_ci| theme.colors.fontFourth                    | Quaternary text color.| #33000000 | ![](figures/33000000.png "#33000000") |#33ffffff|![](figures/33ffffff.png "#33ffffff")|
321e41f4b71Sopenharmony_ci| theme.colors.fontEmphasize                 | Highlight text color.| #ff0a59f7 | ![](figures/ff0a59f7.png "#ff0a59f7") |#ff317af7|![](figures/ff317af7.png "#ff317af7")|
322e41f4b71Sopenharmony_ci| theme.colors.fontOnPrimary                 | Primary text invert color.| #ffffffff | ![](figures/ffffffff.png "#ffffffff") |#ff000000|![](figures/ff000000.png "#ff000000")|
323e41f4b71Sopenharmony_ci| theme.colors.fontOnSecondary               | Secondary text invert color.| #99ffffff | ![](figures/99ffffff.png "#99ffffff") |#99000000|![](figures/99000000.png "#99000000")|
324e41f4b71Sopenharmony_ci| theme.colors.fontOnTertiary                | Tertiary text invert color.| #66ffffff | ![](figures/66ffffff.png "#66ffffff") |#66000000|![](figures/66000000.png "#66000000")|
325e41f4b71Sopenharmony_ci| theme.colors.fontOnFourth                  | Quaternary text invert color.| #33ffffff | ![](figures/33ffffff.png "#33ffffff") |#33000000|![](figures/33000000.png "#33000000")|
326e41f4b71Sopenharmony_ci| theme.colors.iconPrimary                   | Primary icon color.| #e5000000 | ![](figures/e5000000.png "#e5000000") |#e5ffffff|![](figures/e5ffffff.png "#e5ffffff")|
327e41f4b71Sopenharmony_ci| theme.colors.iconSecondary                 | Secondary icon color.| #99000000 | ![](figures/99000000.png "#99000000") |#99ffffff|![](figures/99ffffff.png "#99ffffff")|
328e41f4b71Sopenharmony_ci| theme.colors.iconTertiary                  | Tertiary icon color.| #66000000 | ![](figures/66000000.png "#66000000") |#66ffffff|![](figures/66ffffff.png "#66ffffff")|
329e41f4b71Sopenharmony_ci| theme.colors.iconFourth                    | Quaternary icon color.| #33000000 | ![](figures/33000000.png "#33000000") |#33ffffff|![](figures/33ffffff.png "#33ffffff")|
330e41f4b71Sopenharmony_ci| theme.colors.iconEmphasize                 | Emphasis icon color.| #ff0a59f7 | ![](figures/ff0a59f7.png "#ff0a59f7") |#ff317af7|![](figures/ff317af7.png "#ff317af7")|
331e41f4b71Sopenharmony_ci| theme.colors.iconSubEmphasize              | Emphasis auxiliary icon color.| #660a59f7 | ![](figures/660a59f7.png "#660a59f7") |#66317af7|![](figures/66317af7.png "#66317af7")|
332e41f4b71Sopenharmony_ci| theme.colors.iconOnPrimary                 | Primary icon invert color.| #ffffffff | ![](figures/ffffffff.png "#ffffffff") |#ff000000|![](figures/ff000000.png "#ff000000")|
333e41f4b71Sopenharmony_ci| theme.colors.iconOnSecondary               | Secondary icon invert color.| #99ffffff | ![](figures/99ffffff.png "#99ffffff") |#99000000|![](figures/99000000.png "#99000000")|
334e41f4b71Sopenharmony_ci| theme.colors.iconOnTertiary                | Tertiary icon invert color.| #66ffffff | ![](figures/66ffffff.png "#66ffffff") |#66000000|![](figures/66000000.png "#66000000")|
335e41f4b71Sopenharmony_ci| theme.colors.iconOnFourth                  | Quaternary icon invert color.| #33ffffff | ![](figures/33ffffff.png "#33ffffff") |#33000000|![](figures/33000000.png "#33000000")|
336e41f4b71Sopenharmony_ci| theme.colors.backgroundPrimary             | Primary background color (solid, opaque).| #ffffffff | ![](figures/ffffffff.png "#ffffffff") |#ffe5e5e5|![](figures/ffe5e5e5.png "#ffe5e5e5")|
337e41f4b71Sopenharmony_ci| theme.colors.backgroundSecondary           | Secondary background color (solid, opaque).| #fff1f3f5 | ![](figures/fff1f3f5.png "#fff1f3f5") |#ff191a1c|![](figures/ff191a1c.png "#ff191a1c")|
338e41f4b71Sopenharmony_ci| theme.colors.backgroundTertiary            | Tertiary background color (solid, opaque).| #ffe5e5ea | ![](figures/ffe5e5ea.png "#ffe5e5ea") |#ff202224|![](figures/ff202224.png "#ff202224")|
339e41f4b71Sopenharmony_ci| theme.colors.backgroundFourth              | Quaternary background color (solid, opaque).| #ffd1d1d6 | ![](figures/ffd1d1d6.png "#ffd1d1d6") |#ff2e3033|![](figures/ff2e3033.png "#ff2e3033")|
340e41f4b71Sopenharmony_ci| theme.colors.backgroundEmphasize           | Emphasis background color (solid, opaque).| #ff0a59f7 | ![](figures/ff0a59f7.png "#ff0a59f7") |#ff317af7|![](figures/ff317af7.png "#ff317af7")|
341e41f4b71Sopenharmony_ci| theme.colors.compForegroundPrimary         | Foreground.| #ff000000 | ![](figures/ff000000.png "#ff000000") | #ffe5e5e5 |![](figures/ffe5e5e5.png "#ffe5e5e5")|
342e41f4b71Sopenharmony_ci| theme.colors.compBackgroundPrimary         | White background.| #ffffffff |![](figures/ffffffff.png "#ffffffff")| #ffffffff |![](figures/ffffffff.png "#ffffffff")|
343e41f4b71Sopenharmony_ci| theme.colors.compBackgroundPrimaryTran     | White transparent background.| #ffffffff |![](figures/ffffffff.png "#ffffffff")| #33ffffff |![](figures/33ffffff.png "#33ffffff")|
344e41f4b71Sopenharmony_ci| theme.colors.compBackgroundPrimaryContrary | Always-on background.| #ffffffff |![](figures/ffffffff.png "#ffffffff")| #ffe5e5e5 |![](figures/ffe5e5e5.png "#ffe5e5e5")|
345e41f4b71Sopenharmony_ci| theme.colors.compBackgroundGray            | Gray background.| #fff1f3f5 |![](figures/fff1f3f5.png "#fff1f3f5")| #ffe5e5ea |![](figures/ffe5e5ea.png "#ffe5e5ea")|
346e41f4b71Sopenharmony_ci| theme.colors.compBackgroundSecondary       | Secondary background.| #19000000 |![](figures/19000000.png "#19000000")| #19ffffff |![](figures/19ffffff.png "#19ffffff")|
347e41f4b71Sopenharmony_ci| theme.colors.compBackgroundTertiary        | Tertiary background.| #0c000000 |![](figures/0c000000.png "#0c000000")| #0cffffff |![](figures/0cffffff.png "#0cffffff")|
348e41f4b71Sopenharmony_ci| theme.colors.compBackgroundEmphasize       | Emphasis background.| #ff0a59f7 |![](figures/ff0a59f7.png "#ff0a59f7")| #ff317af7 |![](figures/ff317af7.png "#ff317af7")|
349e41f4b71Sopenharmony_ci| theme.colors.compBackgroundNeutral         | Black, neutral, emphasis background.| #ff000000 |![](figures/ff000000.png "#ff000000")| #ffffffff |![](figures/ffffffff.png "#ffffffff")|
350e41f4b71Sopenharmony_ci| theme.colors.compEmphasizeSecondary        | 20% emphasis background.| #330a59f7 |![](figures/330a59f7.png "#330a59f7")| #33317af7 |![](figures/33317af7.png "#33317af7")|
351e41f4b71Sopenharmony_ci| theme.colors.compEmphasizeTertiary         | 10% emphasis background.| #190a59f7 |![](figures/190a59f7.png "#190a59f7")| #19317af7 |![](figures/19317af7.png "#19317af7")|
352e41f4b71Sopenharmony_ci| theme.colors.compDivider                   | Divider color.| #33000000 |![](figures/33000000.png "#33000000")| #33ffffff |![](figures/33ffffff.png "#33ffffff")|
353e41f4b71Sopenharmony_ci| theme.colors.compCommonContrary            | Common invert color.| #ffffffff |![](figures/ffffffff.png "#ffffffff")| #ff000000 |![](figures/ff000000.png "#ff000000")|
354e41f4b71Sopenharmony_ci| theme.colors.compBackgroundFocus           | Background color in the focused state.| #fff1f3f5 |![](figures/fff1f3f5.png "#fff1f3f5")| #ff000000 |![](figures/fff1f3f5.png "#fff1f3f5")|
355e41f4b71Sopenharmony_ci| theme.colors.compFocusedPrimary            | Primary inverted color in the focused state.| #e5000000 |![](figures/e5000000.png "#e5000000")| #e5ffffff |![](figures/e5ffffff.png "#e5ffffff")|
356e41f4b71Sopenharmony_ci| theme.colors.compFocusedSecondary          | Secondary inverted color in the focused state.| #99000000 |![](figures/99000000.png "#99000000")| #99ffffff |![](figures/99ffffff.png "#99ffffff")|
357e41f4b71Sopenharmony_ci| theme.colors.compFocusedTertiary           | Tertiary inverted color in the focused state.| #66000000 |![](figures/66000000.png "#66000000")| #66ffffff |![](figures/66ffffff.png "#66ffffff")|
358e41f4b71Sopenharmony_ci| theme.colors.interactiveHover              | Common interactive color for the hover state.| #0c000000 |![](figures/0c000000.png "#0c000000")| #0cffffff |![](figures/0cffffff.png "#0cffffff")|
359e41f4b71Sopenharmony_ci| theme.colors.interactivePressed            | Common interactive color for the pressed state.| #19000000 |![](figures/19000000.png "#19000000")| #19ffffff |![](figures/19ffffff.png "#19ffffff")|
360e41f4b71Sopenharmony_ci| theme.colors.interactiveFocus              | Common interactive color for the focused state.| #ff0a59f7 |![](figures/ff0a59f7.png "#ff0a59f7")| #ff317af7 |![](figures/ff317af7.png "#ff317af7")|
361e41f4b71Sopenharmony_ci| theme.colors.interactiveActive             | Common interactive color for the active state.| #ff0a59f7 |![](figures/ff0a59f7.png "#ff0a59f7")| #ff317af7 |![](figures/ff317af7.png "#ff317af7")|
362e41f4b71Sopenharmony_ci| theme.colors.interactiveSelect             | Common interactive color for the selected state.| #33000000 |![](figures/33000000.png "#33000000")| #33ffffff |![](figures/33ffffff.png "#33ffffff")|
363e41f4b71Sopenharmony_ci| theme.colors.interactiveClick              | Common interactive color for the clicked state.| #19000000 |![](figures/19000000.png "#19000000")| #19ffffff |![](figures/19ffffff.png "#19ffffff")|
364