1.

How does Ionic CLI interpret the default colors that are used in the Ionic project ? Ex: light, danger etc. Also how to add custom color to the existing list ?

Answer»

There are a few built-in colours that COME with every Ionic project. As a beginner we will be CURIOUS to know how those colours are programmed. Below are the instructions for same. 

  1. In Ionic project navigate to project/src/theme/variables.scss folder. 
  2. Here there will be a variable named $colours which will contain the various different colours names and their equivalent hexadecimal colour codes.
  3. One can change the colour codes for the default colours ALSO they can add new colour names and hexadecimal code for it.

It is recommended to store the theme colour of the app here. So that you can use it throughout the app and in case if the theme needs to be changed on some OCCASION, then you can just change it here, the entire app gets UPDATED.



Discussion

No Comment Found