I am trying to use different color theme in my 3 environments: dev (green), uat(blue) and prod(red).
I would like to know if, I can read the environment variable in scala in global.scala
override def onStart(app: Application) {
val env = System.getenv("SYSTEM_ENV") //{DEV|UAT|PRD}
}
And then do something on the LESS file that I have, myTheme.LESS
@basecolor: #3B6A52;
which will be read from my other CSS/LESS file as the base background base color
Can I have some logic here to determine the color from my scala variable? e.g. if dev then green else if ....etc
Or if I can have 3 mytheme files, e.g. mythemeRed.LESS, mytmemeBlue.LESS could be determined by play to read only one of them.
Please shed me some light and any idea is welcome.