ColorPalette Overview

Telerik UI for ASP.NET MVC Ninja image

The ColorPalette is part of Telerik UI for ASP.NET MVC, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

The Telerik UI ColorPalette HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI ColorPalette widget.

The ColorPalette component provides collections of predefined colors that you can select and apply in various UI components, texts, backgrounds, and other visual elements.

Initializing the ColorPalette

The following example demonstrates how to define a ColorPalette.

        .Name("colorpalette") // The name of the ColorPalette is mandatory. It specifies the "id" attribute of the component.
        .Value("#ff0000") // Set the value of the ColorPalette.

Basic Configuration

The following example showcases a basic configuration of the ColorPalette with four columns, specified width and height of the color cells, and a predefined color palette.

        .Palette(new string[] { "#ddd1c3", "#d2d2d2", "#746153", "#3a4c8b", "#ffcc33", "#fb455f", "#ac120f" })
        .TileSize(ts => ts.Width(50).Height(50))

Functionality and Features

  • Color Presets—Use predefined color palettes or configure a custom set of palettes.
  • Events—Subscribe to the ColorPalette Change event and implement the desired custom logic.
  • Accessibility—The ColorPalette is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.

Next Steps

See Also

In this article