"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const clamp = require("./dist-es-utils-clamp.cjs");
const index = require("./dist-es-value-types-numbers-index.cjs");
const sanitize = require("./dist-es-value-types-utils-sanitize.cjs");
const utils = require("./dist-es-value-types-color-utils.cjs");
const clampRgbUnit = (v) => clamp.clamp(0, 255, v);
const rgbUnit = {
  ...index.number,
  transform: (v) => Math.round(clampRgbUnit(v))
};
const rgba = {
  test: /* @__PURE__ */ utils.isColorString("rgb", "red"),
  parse: /* @__PURE__ */ utils.splitColor("red", "green", "blue"),
  transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + rgbUnit.transform(red) + ", " + rgbUnit.transform(green) + ", " + rgbUnit.transform(blue) + ", " + sanitize.sanitize(index.alpha.transform(alpha$1)) + ")"
};
exports.rgbUnit = rgbUnit;
exports.rgba = rgba;
//# sourceMappingURL=dist-es-value-types-color-rgba.cjs.map
