color

Get or set the selected color. If no argument is given, this returns the currently selected color as a kendo.Color object.

Parameters

color kendo.Color (optional)

The color that should be set as the current value

Returns

kendo.Color the current value

Example

<div id="colorpalette"></div>
<script>
$("#colorpalette").kendoColorPalette();
var colorpalette = $("#colorpalette").data("kendoColorPalette");

// set the selected color
colorpalette.color(kendo.Color.fromBytes(255, 0, 0));

// get the selected color
var selectedColor = colorpalette.color();
console.log("Selected color:", selectedColor.toHex());
</script>
In this article
color
Not finding the help you need?
Contact Support