fromBytes

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

Parameters

red Number

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

green Number

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

blue Number

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

alpha Number (optional)

The alpha channel of the color, in the range from 0 to 1. Defaults to 1 when omitted.

Returns

kendo.Color A new object that represents the color with the passed color coordinates

Example - get the level of the node

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

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