In short, you would need to retrieve each of the colors, convert to hsl, make your adjustment, then set the colors in the css gradient with the new colors, like
$(myelement).css('background', 'linear-gradient(to bottom, '+ newColor1 +' 0%, ' + newColor2 +' 100%);
Is that what you were looking for?