# RGB and HEX Input Formats

As of the end of 2021, the ColorGradient supports both RGB and HEX formats as input through its [`formats`](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/colorgradient/configuration/formats) configuration.

To choose the default format, use the [`format`](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/colorgradient/configuration/format) option:

```dojo
    <div id="rgb-picker"></div>
    <div id="hex-picker"></div>

    <script>
        $("#rgb-picker").kendoColorGradient({
            preview: false,
            format: "rgb",
            formats: ["rgb", "hex"]
        });

        $("#hex-picker").kendoColorGradient({
            preview: false,
            format: "hex",
            formats: ["rgb", "hex"]
        });
    </script>
```

## See Also

* [RGB and HEX formats of the ColorGradient (Demo)](https://demos.telerik.com/kendo-ui/colorgradient/rgb-hex)
* [JavaScript API Reference of the ColorGradient](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/colorgradient)
