import Color from '../../Color.mjs';
import chroma from '../../chroma.mjs';
import input from '../input.mjs';
import '../../utils/type.mjs';
import unpack from '../../utils/unpack.mjs';

input.format.gl = (...args) => {
    const rgb = unpack(args, 'rgba');
    rgb[0] *= 255;
    rgb[1] *= 255;
    rgb[2] *= 255;
    return rgb;
};

const gl = (...args) => new Color(...args, 'gl');
chroma.gl = gl;

Color.prototype.gl = function () {
    const rgb = this._rgb;
    return [rgb[0] / 255, rgb[1] / 255, rgb[2] / 255, rgb[3]];
};

export { gl };
//# sourceMappingURL=index.mjs.map
