New to Telerik UI for ASP.NET Core? Download free 30-day trial

RGB and HEX Input Formats

The FlatColorPicker supports both RGB and HEX formats as input through its formats configuration. To choose the default format, you can use the format option:

@(Html.Kendo().FlatColorPicker()
      .Name("rgb")
      .Buttons(true)
      .Value("#ff0000")
      .Format(ColorPickerFormat.Rgb)
      .Formats(new string[] {"rgb","hex"})
)
@addTagHelper *, Kendo.Mvc
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

@{
    string[] formats = new string[] { "rgb", "hex" };
}

<kendo-flatcolorpicker name="rgb" value="#ff0000" buttons="true"
  format="ColorPickerFormat.Rgb" formats="formats">
 </kendo-flatcolorpicker>

See Also

In this article