'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

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

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

exports.default = adjustChannel;
