Search code examples
blazorblazor-server-sidemudblazor

How to modify default color on MudRating icon


i have developed a simple one page app with Blazor ( a simple customer satisfaction survey ). I'm using MudBlazor, MudRating to be more specific.

<MudRating @bind-SelectedValue="product_quality" MaxValue="4" FullIcon="@Icons.Material.Rounded.RadioButtonChecked" EmptyIcon="@Icons.Material.Rounded.RadioButtonUnchecked"></MudRating>

There is a way to modify the default icon color used on ther MudRating component? I have tried using

Color="Color.Info"

But it's not working.

Thanks


Solution

  • I have added "MudThemeProvider":

    <MudThemeProvider Theme="defualt"></MudThemeProvider>
    

    and on the @code

    MudTheme defualt = new MudTheme()
    {
        Palette = new Palette()
        {
            Info = "#1C7CCE"
        }
    };
    

    enter image description here

    Thank you.

    EDIT: I have edited the "Info" color to be sure that it will match with the color of another button in the app.