1

Tried to change color from variable with these methods:

//variable.scss
$colors: (
  primary:      #488aff,
  secondary:    #32db64,
  danger:       #f53d3d,
  light:        #f4f4f4,
  dark:         #222,
  navcol2:  #ab2121
);

Tried with these two:

this.statusBar.backgroundColorByName('navcol2)');
//and
this.statusBar.backgroundColorByName('color($colors, navcol2)');

None worked. Any idea?

[This is status bar color therefore timing is the main priority. If i try to implement such 3rd party rendering technique then body will load before status bar color and whole thing will messed up. There must be alternative way to put choices somewhere else.]

Fresco
  • 343
  • 3
  • 13
  • https://stackoverflow.com/questions/9354319/is-there-a-way-to-import-variables-from-javascript-to-sass-or-vice-versa – Suraj Rao Dec 10 '17 at 05:51
  • 2
    well the dupe target is _a part_ of the solution...voted to reopen – Suraj Rao Dec 10 '17 at 06:03
  • 2
    This is `not duplicate`. I have voted for reopening. – Sampath Dec 10 '17 at 06:34
  • 1
    @SurajRao Sampath thanks for your feedback – sebaferreras Dec 10 '17 at 12:58
  • What did you mean by `not working`? – Sampath Dec 11 '17 at 00:36
  • I mean it doesn't change the color of status bar to `#ab2121`. Actually I wanted to change the color of status bar according to navbar bgcolor and the whole project theme as well. Alternatively I can change status bar color by setting up a get function in `provider.ts` like `get stbcolor(){return "#ab2121"}` and in `home.ts` like `this.statusBar.backgroundColorByHexString(this.provider.stbcolor)`. But with this alt method, how to change navbar color easily? – Fresco Dec 11 '17 at 04:52

0 Answers0