3

I've been creating a very small app with a menu some chips and a searchbar. But the problem is that I have forced MD theme in all app as you can see here:

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot(
      {
        mode: 'md'
      }
    ),
    AppRoutingModule,
    HttpClientModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient]
      }
    })
  ],
  providers: [
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
  ],
  bootstrap: [AppComponent],
})
export class AppModule { }

But in android it keeps seeing like this even android is Light Mode:

Android Screenshot (Click me)

So anyone knows why it is always displaying in dark mode and how to fix it? I want the mobile devices to switch from dark to light when system is in that mode not only dark.

Ravekon
  • 68
  • 6

1 Answers1

0
  1. Open index.html in src folder in root of your project.
  2. Search with "light dark" and remove "dark" from the line.
  3. Open themes/variables.scss file and search dark.
  4. Remove the block that has "Dark".
  5. Restart the app and find the difference.
mani kandan
  • 399
  • 2
  • 6
  • Okay now it changes. But if I want to change the dark theme colors? I have this variables.css now https://www.toptal.com/developers/hastebin/lukewohuje.scss – Ravekon Mar 10 '22 at 15:53
  • I'm in the same situation now how can i modify the dark theme colors? – Àlex Mar 12 '22 at 18:05