import Utils from '../utils/index.mjs';
import Color from '../color/index.mjs';

/* IMPORT */
/* MAIN */
const change = (color, channels) => {
    const ch = Color.parse(color);
    for (const c in channels) {
        ch[c] = Utils.channel.clamp[c](channels[c]);
    }
    return Color.stringify(ch);
};

export { change as default };
