'use strict';

var index$1 = require('../utils/index.js');
var index = require('../color/index.js');

/* IMPORT */
/* MAIN */
const adjustChannel = (color, channel, amount) => {
    const channels = index.parse(color);
    const amountCurrent = channels[channel];
    const amountNext = index$1.channel.clamp[channel](amountCurrent + amount);
    if (amountCurrent !== amountNext)
        channels[channel] = amountNext;
    return index.stringify(channels);
};

module.exports = adjustChannel;
