# ASP.NET MVC ColorGradient Overview

The Telerik UI ColorGradient HtmlHelper for ASP.NET MVC is a server-side wrapper for the [Kendo UI ColorGradient](https://docs.telerik.com/kendo-ui/controls/colorgradient/overview) widget.

The ColorGradient is a component that renders a gradient color palette. It has a hue and an alpha slider and provides an input that allows you to enter a color or copy the selected one.

<CtaPanelIntroduction></CtaPanelIntroduction>

* [Demo page for the ColorGradient](https://demos.telerik.com/aspnet-mvc/colorgradient/index)

## Initializing the ColorGradient

The ColorGradient is usually used as a color editor. The following example demonstrates how to define the ColorGradient.

```Razor HtmlHelper
    @(Html.Kendo().ColorGradient()
        .Name("colorGradient") // The name of the ColorGradient is mandatory. It specifies the "id" attribute.
        .Value("#ff0000")
    )
```

## Basic Configuration

The ColorGradient provides default configuration options such as input, format, opacity, and so on.

The following example shows a basic implementation of the control.

```Razor HtmlHelper
    @(Html.Kendo().ColorGradient()
        .Name("colorGradient")
        .Input(true)
        .Format(ColorGradientFormat.Hex)
        .Opacity(true)
        .Value("#f16e0aff")
    )
```

## Functionality and Features

* [Formats](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/colorgradient/rgb-hex-formats)—The ColorGradient supports both RGB and HEX input formats.
* [Contrast Tool](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/colorgradient/contrast-tool)—You can use the Color Contrast Tool that is built into the ColorGradient to check the color contrast ratio between two colors.
* [Accessibility](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/colorgradient/accessibility/overview)—The ColorGradient is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.2, and keyboard support.

## Next Steps

* [Getting Started with the ColorGradient](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/colorgradient/getting-started)
* [Basic Usage of the ColorGradient for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/colorgradient/index)

## See Also

* [Using the API of the ColorGradient for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/colorgradient/api)
* [Knowledge Base Section](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base)
