0
Friends and friends recently started my studies in Ionic and I started in the most current version (6.4.2)
I’m having such a hard time that I’m beginning to question my intelligence. (laughs)
I’m trying to do something simple like change the color of a component. I’ve tried changing the app.component.scss including an equally simple instruction like:
:root {
--ion-background-color: #ff3700;
}
I have tried to include a color following the Ionic documentation including on (my page name).page.scss:
:root {
--ion-color-teste: #2B4A42;
--ion-color-teste-rgb: 43,74,66;
--ion-color-teste-contrast: #ffffff;
--ion-color-teste-contrast-rgb: 255,255,255;
--ion-color-teste-shade: #26413a;
--ion-color-teste-tint: #405c55;
}
.ion-color-teste {
--ion-color-base: var(--ion-color-teste);
--ion-color-base-rgb: var(--ion-color-teste-rgb);
--ion-color-contrast: var(--ion-color-teste-contrast);
--ion-color-contrast-rgb: var(--ion-color-teste-contrast-rgb);
--ion-color-shade: var(--ion-color-teste-shade);
--ion-color-tint: var(--ion-color-teste-tint);
}
Ai in my HTML I only include this color in a component as an "ion-button", also following an example from the Ionic documentation
<ion-button color="teste">Teste</ion-button>
But for some extremely strange reason nothing works. I have finished serving and started again.
I’ve tried everything but I can’t create or change colors in Ionic.
Thanks so much for your attention and help.