# Namespace: Util

## Kinetic. Util

Source:
  - kinetic-v5.1.10.js, line 963

### Methods

#### addMethods(constructor, methods)

  adds methods to a constructor prototype

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `constructor` | function |
  `methods` | Object |

  Source:
    - kinetic-v5.1.10.js, line 1281

#### get()

  return value with default fallback

  Source:
    - kinetic-v5.1.10.js, line 1164

#### getRandomColor()

  return random hex color

  Source:
    - kinetic-v5.1.10.js, line 1152

#### getRGB(color)

  get RGB components of a color

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `color` | String |

  Source:
    - kinetic-v5.1.10.js, line 1183

  ##### Example

      // each of the following examples return {r:0, g:0, b:255}
      var rgb = Kinetic.Util.getRGB('blue');
      var rgb = Kinetic.Util.getRGB('#0000ff');
      var rgb = Kinetic.Util.getRGB('rgb(0,0,255)');