colorString

The color in any of the following formats.

| Format | Description | --- | --- | --- | red | Basic or Extended CSS Color name | #ff0000 | Hex RGB value | rgb(255, 0, 0) | RGB value

Specifying 'none', 'transparent' or '' (empty string) will clear the fill.

Example

<div id="surface"></div>
<script>
var draw = kendo.drawing;
var surface = draw.Surface.create($("#surface"));

// Using different color formats
var stop1 = new draw.GradientStop({
    offset: 0,
    color: "red" // CSS color name
});

var stop2 = new draw.GradientStop({
    offset: 0.5,
    color: "#00ff00" // Hex RGB value
});

var stop3 = new draw.GradientStop({
    offset: 1,
    color: "rgb(0, 0, 255)" // RGB value
});

console.log(stop1.options.color); // "red"
console.log(stop2.options.color); // "#00ff00"
console.log(stop3.options.color); // "rgb(0, 0, 255)"
</script>
In this article
color
Not finding the help you need?
Contact Support