# 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.

```Razor HtmlHelper
    @(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

* [RGB and HEX formats of the ColorGradient (Demo)](https://demos.telerik.com/aspnet-mvc/colorgradient/rgb-hex)
* [Server-Side API](https://www.telerik.com/aspnet-mvc/documentation/api/colorgradient)
* [Client-Side API](https://docs.telerik.com/kendo-ui/api/ui/colorgradient)
