import Color from '../color/index.mjs';
import change from './change.mjs';

/* IMPORT */
/* MAIN */
const adjust = (color, channels) => {
    const ch = Color.parse(color);
    const changes = {};
    for (const c in channels) {
        if (!channels[c])
            continue;
        changes[c] = ch[c] + channels[c];
    }
    return change(color, changes);
};

export { adjust as default };
