New to Kendo UI for jQueryStart a free 30-day trial

FromRGB

static methods

Creates a new color object from the rgba channels in the 0..1 range.

Parameters:redNumber

The red channel of the color, in the range from 0 to 1.

greenNumber

The green channel of the color, in the range from 0 to 1.

blueNumber

The blue channel of the color, in the range from 0 to 1.

Returns:kendo.Color

A new object that represents the color with the passed color coordinates

<script>
var color = kendo.Color.fromRGB(1,0,0);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(color.toCss()); // logs "#ff0000"

color = kendo.Color.fromRGB(0,1,0,1);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(color.toCssRgba()); // logs "rgba(0, 255, 0, 1)"
</script>
Not finding the help you need?
Contact Support