src/core/util/color.js
function hexToRgba (color) {
    var hex   = color[ 0 ] === '#' ? color.substr(1) : color,
      dig   = hex.length / 3,
      red   = hex.substr(0, dig),
      green = hex.substr(dig, dig),
      blue  = hex.substr(dig * 2);
    if (dig === 1) {
      red += red;
      green += green;
      blue += blue;
    }
    return 'rgba(' + parseInt(red, 16) + ',' + parseInt(green, 16) + ',' + parseInt(blue, 16) + ',0.1)';
  }
function hexToRgba (color) {
    var hex   = color[ 0 ] === '#' ? color.substr(1) : color,
      dig   = hex.length / 3,
      red   = hex.substr(0, dig),
      green = hex.substr(dig, dig),
      blue  = hex.substr(dig * 2);
    if (dig === 1) {
      red += red;
      green += green;
      blue += blue;
    }
    return 'rgba(' + parseInt(red, 16) + ',' + parseInt(green, 16) + ',' + parseInt(blue, 16) + ',0.1)';
  }
function hexToRgba ( color ) { var hex = color [ 0 ] === '#' ? color . substr ( 1 ) : color , dig = hex . length / 3 , red = hex . substr ( 0 , dig ) , green = hex . substr ( dig , dig ) , blue = hex . substr ( dig * 2 ) ; if ( dig === 1 ) { red += red ; green += green ; blue += blue ; } return 'rgba(' + parseInt ( red , 16 ) + ',' + parseInt ( green , 16 ) + ',' + parseInt ( blue , 16 ) + ',0.1)' ; }
Converts hex value to RGBA string
@param color {string}
@returns {string}
Converts hex value to RGBA string