function hex2rxb(hex) {
    if (hex.charAt(0) === '#')
      hex = hex.substr(1);
    var r = hex.substr(0,2);
    var g = hex.substr(2,2);
    var b = hex.substr(4,2);
    return [ h2d(r), h2d(g), h2d(b) ];
  }
/**
   * Convert a RYB or RGB hex string to an array
   *
   * @param hex2rxb  {string} a string like '0000ff'
   *
   * returns an array of length 3
   *
   * ex: '0000ff' => [0, 0, 255]
   */
Convert a RYB or RGB hex string to an array
@param hex2rxb  {string} a string like '0000ff'

returns an array of length 3


Convert a RYB or RGB hex string to an array @param hex2rxb { string } a string like ' 0000ff ' returns an array of length 3
function hex2rxb(hex) {
    if (hex.charAt(0) === '#')
      hex = hex.substr(1);
    var r = hex.substr(0,2);
    var g = hex.substr(2,2);
    var b = hex.substr(4,2);
    return [ h2d(r), h2d(g), h2d(b) ];
  }
function hex2rxb ( hex ) { if ( hex . charAt ( 0 ) === '#' ) hex = hex . substr ( 1 ) ; var r = hex . substr ( 0 , 2 ) ; var g = hex . substr ( 2 , 2 ) ; var b = hex . substr ( 4 , 2 ) ; return [ h2d ( r ) , h2d ( g ) , h2d ( b ) ] ; }
Convert a RYB or RGB hex string to an array
 @param hex2rxb  {string} a string like '0000ff'
Convert a RYB or RGB hex string to an array @param hex2rxb { string } a string like ' 0000ff '