@kcuf/mere-color
Version:
Mere color utils for generating, manipulation, a11y purposes.
15 lines (14 loc) • 359 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = saturate;
var _util = require("../util");
/**
* Increases the intensity of a color.
*/
function saturate(color, amount) {
return (0, _util.manipulateHsl)(color, function (hsl) {
return (0, _util.hslShiftSaturation)(hsl, amount > 0 ? amount : 0);
});
}