Files
SnowLuma/.pnpm-store/v11/files/21/f66a1dfe55279bda342451c67b2df9e11829fda15a6430acf6d6c12bfe5f3d38a82b7239649272e4ad7e15258fc21065a08c1d24786d3cefbaffc1f413c9ce
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

24 lines
763 B
Plaintext

import { alpha } from '../numbers/index.mjs';
import { percent } from '../numbers/units.mjs';
import { sanitize } from '../utils/sanitize.mjs';
import { splitColor, isColorString } from './utils.mjs';
const hsla = {
test: /*@__PURE__*/ isColorString("hsl", "hue"),
parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"),
transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
return ("hsla(" +
Math.round(hue) +
", " +
percent.transform(sanitize(saturation)) +
", " +
percent.transform(sanitize(lightness)) +
", " +
sanitize(alpha.transform(alpha$1)) +
")");
},
};
export { hsla };
//# sourceMappingURL=hsla.mjs.map