Cannot Get Radio Button to Change off Pink When Selected

I’m stumped and have browsed numerous forums trying to figure out a way to change the color of a radio button when it is selected. I’m going nuts. I have this,

$Theme = @{  
    palette   = @{
        primary    = @{
            main = '#D57D28'
        }
        background = @{
            default = '#3E6C7D'
        }
    }
    overrides = @{
        MuiTypography = @{
            h6 = @{
                'font-family' = 'Geneva, Verdana, serif'
                'font-weight' = '500'
                color         = '#000000'   
            }
        }
        MuiRadio = @{
            root = @{
                color = '#3E6C7D'
                'Mui-Checked' = @{
                    color = '#3E6C7D' 
                }
            }
        }
    }
}

I’ve tried everything with MUIRadio to get it to change when it is selected. I’m not sure what I am doing wrong. I have seen syntax involving, '&$checked' but have not had any luck with that.

Any help would be greatly appreciated. Thank you!

This is how to do it:

$Theme = @{  
    palette   = @{
        primary    = @{
            main = '#D57D28'
        }
        background = @{
            default = '#3E6C7D'
        }
    }
    overrides = @{
        MuiTypography = @{
            h6 = @{
                'font-family' = 'Geneva, Verdana, serif'
                'font-weight' = '500'
                color         = '#000000'   
            }
        }
        MuiRadio = @{
            checked = @{
                color = "grey !important"
            }
            colorSecondary = @{
                color = "blue"
            }
        }
    }
}

image

I grabbed the rule name from here: Radio API - Material-UI

Then I added the !important to make sure other styles don’t override it.

Thank you @adam ! Super appreciated. I’ll make sure to reference MUI documents more often. I’ve got a long way to go with PSU haha.

If it makes you feel better it took me quite a bit of futzing to get that right… :wink:

1 Like