New to Telerik UI for Blazor? Download free 30-day trial

Custom Colors

You can provide your own set of colors to the Blazor Color Palette component. You can use a valid CSS color, and pass a IEnumerable<string> to the Colors parameter.

Custom collection of colors in the Color Palette component

@MyColor
<br />

<TelerikColorPalette Colors="@MyCustomColorList" @bind-Value="@MyColor">
</TelerikColorPalette>

@code {
    string MyColor { get; set; }
    List<string> MyCustomColorList { get; set; } = new List<string> { "red", "#0f0", "#0000ff" };
}

The result from the code snippet above

custom color collections

See Also

In this article
Not finding the help you need? Improve this article