How to do it...

Here are the instructions:

  1. Create a new app using the tutorial template, as shown, and go to the folder:
$ ionic start ThemeApp tutorial
$ cd ThemeApp
In Ionic 1, you need to set up Sass dependencies because Ionic uses a number of external libraries for this. However, Ionic has no such requirements because all the dependencies are added when you create the project.
  1. Open the .../src/theme/variable.scss file, and replace the $colors variable with the following commands:
    $colors: (
      primary:    #2C3E50, // #387ef5,
      clear:      white,
      secondary:  #446CB3, // #32db64,
      danger:     #96281B, // #f53d3d,
      light:      #BDC3C7, // #f4f4f4,
      dark:       #6C7A89, // #222,
      favorite:   #16A085 // #69BB7B
    );
The default color codes can be commented out, as shown ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.