import '../../utils/type.mjs';
import unpack from '../../utils/unpack.mjs';
import rgb2lab from '../lab/rgb2lab.mjs';
import lab2lch from './lab2lch.mjs';

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

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