arty-charty/util.js
function lightenColor(col, amount) {
  let colRgba = parseColor(col);
  let colHsla = rgbaToHsla(colRgba.r, colRgba.g, colRgba.b, colRgba.a);
  colRgba = hslaToRgba(colHsla[0],colHsla[1],Math.min(Math.max(colHsla[2]+amount, 0), 1),colHsla[3]);
  return RGBobj2string({
    r: colRgba[0],
    g: colRgba[1],
    b: colRgba[2],
    a: colRgba[3]
  });
}
function lightenColor(col, amount) {
  let colRgba = parseColor(col);
  let colHsla = rgbaToHsla(colRgba.r, colRgba.g, colRgba.b, colRgba.a);
  colRgba = hslaToRgba(colHsla[0],colHsla[1],Math.min(Math.max(colHsla[2]+amount, 0), 1),colHsla[3]);
  return RGBobj2string({
    r: colRgba[0],
    g: colRgba[1],
    b: colRgba[2],
    a: colRgba[3]
  });
}
function lightenColor ( col , amount ) { let colRgba = parseColor ( col ) ; let colHsla = rgbaToHsla ( colRgba . r , colRgba . g , colRgba . b , colRgba . a ) ; colRgba = hslaToRgba ( colHsla [ 0 ] , colHsla [ 1 ] , Math . min ( Math . max ( colHsla [ 2 ] + amount , 0 ) , 1 ) , colHsla [ 3 ] ) ; return RGBobj2string ( { r : colRgba [ 0 ] , g : colRgba [ 1 ] , b : colRgba [ 2 ] , a : colRgba [ 3 ] } ) ; }
Increase colour lightness by the given amount.
Increase colour lightness by the given amount .