apis/nucleus/dist/nucleus.dev.js
/**
   * Converts a color from hsl format to rgb format.
   *
   * @param {string} color - HSL color values
   * @returns {string} rgb color values
   */
Converts a color from hsl format to rgb format.
@param {string} color - HSL color values
@returns {string} rgb color values
Converts a color from hsl format to rgb format . @param { string } color - HSL color values @returns { string } rgb color values
function hslToRgb(color) {
    color = decomposeColor(color);
    var _color = color,
        values = _color.values;
    var h = values[0];
    var s = values[1] / 100;
    var l = values[2] / 100;
    var a = s * Math.min(l, 1 - l);
    var f = function f(n) {
      var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;
      return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
    };
    var type = 'rgb';
    var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
    if (color.type === 'hsla') {
      type += 'a';
      rgb.push(values[3]);
    }
    return recomposeColor({
      type: type,
      values: rgb
    });
  }
function hslToRgb ( color ) { color = decomposeColor ( color ) ; var _color = color , values = _color . values ; var h = values [ 0 ] ; var s = values [ 1 ] / 100 ; var l = values [ 2 ] / 100 ; var a = s * Math . min ( l , 1 - l ) ; var f = function f ( n ) { var k = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : ( n + h / 30 ) % 12 ; return l - a * Math . max ( Math . min ( k - 3 , 9 - k , 1 ) , - 1 ) ; } ; var type = 'rgb' ; var rgb = [ Math . round ( f ( 0 ) * 255 ) , Math . round ( f ( 8 ) * 255 ) , Math . round ( f ( 4 ) * 255 ) ] ; if ( color . type === 'hsla' ) { type += 'a' ; rgb . push ( values [ 3 ] ) ; } return recomposeColor ( { type : type , values : rgb } ) ; }
Converts a color from hsl format to rgb format.
Converts a color from hsl format to rgb format .