'use strict';

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

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

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

exports.default = rgba;
