Namespace: Util

Konva. Util

Methods

addMethods(constructor, methods)

adds methods to a constructor prototype

Parameters:
Name Type Description
constructor function
methods Object
Source:

get()

return value with default fallback

Source:

getRandomColor()

return random hex color

Source:

getRGB(color)

get RGB components of a color

Parameters:
Name Type Description
color String
Source:
Example
// each of the following examples return {r:0, g:0, b:255}
var rgb = Konva.Util.getRGB('blue');
var rgb = Konva.Util.getRGB('#0000ff');
var rgb = Konva.Util.getRGB('rgb(0,0,255)');
Konva Copyright © 2015 The contributors to the Konva project.
Documentation generated by JSDoc 3.2.2 on Tue Jan 27th 2015 using the DocStrap template.