
# 设置导航栏背景和字体颜色
扫码体验：
![](https://support.huaweicloud.com/devg-welink/figure/zh-cn_image_0000001485177889.png "点击放大")
#### 请求参数
| **参数**          | **类型** | **必填** | **说明**                                     |
|:---|:---|:---|:---|
| frontColor      | string | 是      | 前景颜色值，包括按钮、标题、状态栏的颜色，仅支持 #ffffff 和 #000000 |
| backgroundColor | string | 是      | 背景颜色值，有效值为十六进制颜色                           |
   
#### 返回结果
| **参数** | **类型** | **说明** |
|:---|:---|:---|
| status | number | 1：成功   |
   
#### 请求示例
- ES6版本
```
HWH5.setNavigationBarColor({
    frontColor: '#ffffff',
    backgroundColor: '#66ff00'
  })
    .then(data => {
      console.log(data);
    })
    .catch(error => {
      console.log(error);
    });
```
- ES5版本
```
HWH5.setNavigationBarColor({
    frontColor: '#ffffff',
    backgroundColor: '#66ff00'
  })
    .then(function (data) {
      console.log(data);
    })
    .catch(function (error) {
      console.log(error);
    });
```
**HWH5.showToast**
[支持版本\>=10.0.5](https://open.welink.huaweicloud.com/docs/#/990hh0/whokyc/fa5obu)
