New to Telerik UI for ASP.NET MVCStart a free 30-day trial

RGB and HEX Input Formats

Updated over 6 months ago

The ColorGradient supports both RGB and HEX input formats. You can be specify them through the .Formats() configuration. To choose the default format, use the .Format() option.

Razor
    @(Html.Kendo().ColorGradient()
        .Name("rgb-picker")
        .Format(ColorGradientFormat.Rgb)
        .Formats(new string[] { "rgb", "hex" })
    )

    @(Html.Kendo().ColorGradient()
        .Name("hex-picker")
        .Format(ColorGradientFormat.Hex)
        .Formats(new string[] { "rgb", "hex" })
    )

See Also

In this article
See Also
Not finding the help you need?
Contact Support