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

ParseColor

methods

Parse a color string to a Color object. If the input is not valid throws an Error, unless the noerror argument is given.

Parameters:colorString

A string in one of the following (case-insensitive) CSS notations:

  • #F00 (optionally without the sharp: F00)
  • #FF0000 (optionally without the sharp: FF0000)
  • rgb(255, 0, 0)
  • rgba(255, 0, 0, 1)

Particularly if this argument is null or the string "transparent" then this function will return null.

Returns:kendo.Color

A Color object.

<script>
var red = kendo.parseColor("#ff0000");
</script>
Not finding the help you need?
Contact Support