# StatusBar.backgroundColorByHexString not working

**URL:** <https://forum.ionicframework.com/t/statusbar-backgroundcolorbyhexstring-not-working/70060>\
**Category:** ionic-v1\
**Created:** [November 13, 2016, 8:46pm UTC](https://forum.ionicframework.com/t/statusbar-backgroundcolorbyhexstring-not-working/70060 "2016-11-13T20:46:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![1BJK903](https://avatars.discourse-cdn.com/v4/letter/1/9e8a1a/32.png) [@1BJK903](https://forum.ionicframework.com/u/1BJK903)\
**Post date:** [November 13, 2016, 8:46pm UTC](https://forum.ionicframework.com/t/statusbar-backgroundcolorbyhexstring-not-working/70060/1 "2016-11-13T20:46:11Z")

</div>

Hi all,

This is my code:

```
  ionic.Platform.ready(function() {
	  if (window.StatusBar) {
	    // org.apache.cordova.statusbar required
		    StatusBar.overlaysWebView(false);
		    StatusBar.backgroundColorByHexString('#000000');
	  }
	});

```

I want to change the status bar color, but whatever I do: it doesn’t work at all!

I’ve checked everything and tried everything that is stated here: [http://ionicframework.com/docs/v2/native/status-bar/](http://ionicframework.com/docs/v2/native/status-bar/)

Not working at all. Can someone help me please?

PS: testing on Ionic View

---

<div class="post-metadata">

**Author:** ![johnyellow](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@johnyellow](https://forum.ionicframework.com/u/johnyellow)\
**Post date:** [January 19, 2017, 6:48am UTC](https://forum.ionicframework.com/t/statusbar-backgroundcolorbyhexstring-not-working/70060/2 "2017-01-19T06:48:59Z")

</div>

I have the same issue.  
The status bar color did change in android emulator but has no effect at all for real android device.

---

<div class="post-metadata">

**Author:** ![nixshetty](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@nixshetty](https://forum.ionicframework.com/u/nixshetty)\
**Post date:** [January 22, 2017, 8:36am UTC](https://forum.ionicframework.com/t/statusbar-backgroundcolorbyhexstring-not-working/70060/3 "2017-01-22T08:36:38Z")

</div>

I have used below code and it works for me.

var isAndroid = ionic.Platform.isAndroid();  
if (isAndroid) {  
StatusBar.backgroundColorByHexString("#e21337");  
}
