JavaScript Function to calculate a lighter and darker shade of a color