import '../../utils/type.mjs';
import unpack from '../../utils/unpack.mjs';
import rgb2oklab from '../oklab/rgb2oklab.mjs';
import lab2lch from '../lch/lab2lch.mjs';

const rgb2oklch = (...args) => {
    const [r, g, b, ...rest] = unpack(args, 'rgb');
    const [l, a, b_] = rgb2oklab(r, g, b);
    const [L, c, h] = lab2lch(l, a, b_);
    return [L, c, h, ...(rest.length > 0 && rest[0] < 1 ? [rest[0]] : [])];
};

export { rgb2oklch as default };
//# sourceMappingURL=rgb2oklch.mjs.map
