How can I change the color of the using CSS?
Saw on another post that if I use the following code, it would change it, but I had no luck with it so far.
.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
background-color:rgb(255, 37, 37);
}
.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle {
border-color: rgb(66, 134, 244);
}
.mat-radio-button.mat-accent .mat-radio-inner-circle {
background-color: rgb(66, 134, 244);
}
Also, how could I use the rest of the color hues?
<mat-radio-button color="accent">Hello, World</mat-radio-button>
Let's say that I want to use from the Accent color, the hue of 300 or A100, how would I go about to doing that?
I've tried using accent-100
and accent hue-100
but, it doesn't work
add this css in your style.css/style.scss
Stackblitz
style.css/style.scss
.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{
border-color:rgb(66, 134, 244);
}
.mat-radio-button.mat-accent .mat-radio-inner-circle{
color:rgb(66, 134, 244);
background-color:rgb(66, 134, 244) ;
}
.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
background-color:rgb(255, 37, 37,.26);
}
None of the above worked for me. But this one worked i.e put color="primary" on mat -radio button. ie
<mat-radio-button color="primary" value=1>Active</<mat-radio-button>.
See example below
https://stackblitz.com/edit/angular-material2-issue-ethbcx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With