apis/nucleus/dist/nucleus.dev.js
/**
   * Converts a color object with type and values to a string.
   *
   * @param {object} color - Decomposed color
   * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
   * @param {array} color.values - [n,n,n] or [n,n,n,n]
   * @returns {string} A CSS color string
   */
Converts a color object with type and values to a string.
Converts a color object with type and values to a string .
function recomposeColor(color) {
    var type = color.type;
    var values = color.values;
    if (type.indexOf('rgb') !== -1) {
      values = values.map(function (n, i) {
        return i < 3 ? parseInt(n, 10) : n;
      });
    } else if (type.indexOf('hsl') !== -1) {
      values[1] = "".concat(values[1], "%");
      values[2] = "".concat(values[2], "%");
    }
    return "".concat(type, "(").concat(values.join(', '), ")");
  }
function recomposeColor ( color ) { var type = color . type ; var values = color . values ; if ( type . indexOf ( 'rgb' ) !== - 1 ) { values = values . map ( function ( n , i ) { return i < 3 ? parseInt ( n , 10 ) : n ; } ) ; } else if ( type . indexOf ( 'hsl' ) !== - 1 ) { values [ 1 ] = "" . concat ( values [ 1 ] , "%" ) ; values [ 2 ] = "" . concat ( values [ 2 ] , "%" ) ; } return "" . concat ( type , "(" ) . concat ( values . join ( ', ' ) , ")" ) ; }
Converts a color object with type and values to a string.
Converts a color object with type and values to a string .
// Only convert the first 3 values to int (i.e. not alpha)