@kcuf/mere-color
Version:
Mere color utils for generating, manipulation, a11y purposes.
8 lines • 361 B
JavaScript
import { manipulateHsl, hslShiftLightness } from '../util';
export default function darken(color) {
var deltaLightness = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
return manipulateHsl(color, function (hsl) {
return hslShiftLightness(hsl, deltaLightness > 0 ? -deltaLightness : 0);
});
}
//# sourceMappingURL=darken.js.map