RGB and HEX Input Formats
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.
@(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" })
)
@{
var format_types = new string[] { "rgb", "hex" };
}
<kendo-colorgradient name="rgb-picker"
format="ColorGradientFormat.Rgb"
formats="format_types">
</kendo-colorgradient>
<kendo-colorgradient name="hex-picker"
format="ColorGradientFormat.Hex"
formats="format_types">
</kendo-colorgradient>