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

ToRGB

methods

Returns the color in RGB representation. The result has the following properties:

  • r -- red component as floating point between 0 and 1
  • g -- green component
  • b -- blue component
  • a -- alpha

This does not modify the current object, it creates a new one instead.

Returns:Object

An object with r, g, b and a fields.

<script>
var color = kendo.parseColor("#ff0000");
var rgbColor = color.toRGB();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(rgbColor); // logs {r: 1, g: 0, b: 0, a: 1}
</script>
Not finding the help you need?
Contact Support