const require_to_rgba = require("../to-rgba/to-rgba.cjs");
//#region packages/@mantine/core/src/core/MantineProvider/color-functions/darken/darken.ts
function darken(color, alpha) {
	if (color.startsWith("var(")) return `color-mix(in srgb, ${color}, black ${alpha * 100}%)`;
	const { r, g, b, a } = require_to_rgba.toRgba(color);
	const f = 1 - alpha;
	const dark = (input) => Math.round(input * f);
	return `rgba(${dark(r)}, ${dark(g)}, ${dark(b)}, ${a})`;
}
//#endregion
exports.darken = darken;

//# sourceMappingURL=darken.cjs.map