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

/* IMPORT */
/* MAIN */
const rgba = (r, g, b = 0, a = 1) => {
    if (typeof r !== 'number')
        return change(r, { a: g });
    const channels$1 = channels.set({
        r: Utils.channel.clamp.r(r),
        g: Utils.channel.clamp.g(g),
        b: Utils.channel.clamp.b(b),
        a: Utils.channel.clamp.a(a)
    });
    return Color.stringify(channels$1);
};

export { rgba as default };
