@kcuf/mere-color
Version:
Mere color utils for generating, manipulation, a11y purposes.
15 lines (14 loc) • 389 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = rotate;
var _util = require("../util");
/**
* Rotate hue of a color, returning the new color in the original notation normalized.
*/
function rotate(color, delta, unit) {
return (0, _util.manipulateHsl)(color, function (hsl) {
return (0, _util.hslShiftHue)(hsl, delta, unit);
});
}