# Can't change Statusbar color

**URL:** <https://forum.ionicframework.com/t/cant-change-statusbar-color/126504>\
**Category:** Ionic Native\
**Created:** [March 31, 2018, 7:20pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504 "2018-03-31T19:20:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MauriceNino](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@MauriceNino](https://forum.ionicframework.com/u/MauriceNino)\
**Post date:** [March 31, 2018, 7:20pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/1 "2018-03-31T19:20:33Z")

</div>

Hello there!

I have tried several methods.

Here is what I have right now (which should work):

```auto
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
    platform.ready().then(() => {
      statusBar.styleDefault();
      statusBar.overlaysWebView(true);
      statusBar.backgroundColorByHexString('#FF3B3F')
      //splashScreen.hide();
    })
  }

```

But the StatusBar is still light blue (Testing on native Device Samsung S7 via `ionic cordova run android --device`).

I have also tried the old way of adding this:

`<preference name="StatusBarBackgroundColor" value="#FF3B3F" />`

to the config.xml, but ofcourse it didnt change a thing.

Ionic info output:

> cli packages:
> 
> ```
> @ionic/cli-utils : 1.19.2
> ionic (Ionic CLI) : 3.20.0
> 
> ```
> 
> global packages:
> 
> ```
> cordova (Cordova CLI) : 8.0.0
> 
> ```

---

<div class="post-metadata">

**Author:** ![hadicreations](https://avatars.discourse-cdn.com/v4/letter/h/9fc29f/32.png) [@hadicreations](https://forum.ionicframework.com/u/hadicreations)\
**Post date:** [April 2, 2018, 1:01am UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/2 "2018-04-02T01:01:23Z")

</div>

You just unistall statusbar and install status bar 3.12.1

npm uninstall --save @ionic-native/status-bar

to  
npm uninstall --save @ionic-native/status-bar@3.12.1

---

<div class="post-metadata">

**Author:** ![MauriceNino](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@MauriceNino](https://forum.ionicframework.com/u/MauriceNino)\
**Post date:** [April 2, 2018, 5:49pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/3 "2018-04-02T17:49:59Z")

</div>

> [@hadicreations](#):
>
> npm uninstall --save @ionic-native/status-bar@3.12.1

Small typo there.

But it still doesn’t change anything - statusbar is still blue

---

<div class="post-metadata">

**Author:** ![bhavin\_webdesk](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bhavin\_webdesk](https://forum.ionicframework.com/u/bhavin_webdesk)\
**Post date:** [April 5, 2018, 1:36pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/4 "2018-04-05T13:36:50Z")

</div>

You should not use this line if you want to change color.

> [@MauriceNino](#):
>
> statusBar.styleDefault();

---

<div class="post-metadata">

**Author:** ![MauriceNino](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@MauriceNino](https://forum.ionicframework.com/u/MauriceNino)\
**Post date:** [April 5, 2018, 8:48pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/5 "2018-04-05T20:48:47Z")

</div>

Commented it out, but still didnt change anything.

Also I think that the `styleDefault()` function is only to set the text color, because the docs say

> Use the default statusbar (dark text, for light backgrounds).

which for me sounds like it only sets the text color according to the statusbar color.

---

<div class="post-metadata">

**Author:** ![bhavin\_webdesk](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bhavin\_webdesk](https://forum.ionicframework.com/u/bhavin_webdesk)\
**Post date:** [April 6, 2018, 6:38am UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/6 "2018-04-06T06:38:41Z")

</div>

I tested on my android device v7.0.1 and it is working fine. In which device are you testing?

---

<div class="post-metadata">

**Author:** ![MauriceNino](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@MauriceNino](https://forum.ionicframework.com/u/MauriceNino)\
**Post date:** [April 11, 2018, 6:00pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/7 "2018-04-11T18:00:34Z")

</div>

Samsung Galaxy S7 running on Android 7.0

---

<div class="post-metadata">

**Author:** ![bhavin\_webdesk](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bhavin\_webdesk](https://forum.ionicframework.com/u/bhavin_webdesk)\
**Post date:** [April 12, 2018, 6:31am UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/8 "2018-04-12T06:31:46Z")

</div>

Can you share code or file where you write this code?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:42pm UTC](https://forum.ionicframework.com/t/cant-change-statusbar-color/126504/9 "2021-07-19T21:42:27Z")

</div>

Closed on July 19, 2021, 9:42pm UTC


