import { rnd2, rnd3 } from '../../utils/index.mjs';
import unpack from '../../utils/unpack.mjs';

const oklab2css = (...args) => {
    const laba = unpack(args, 'lab');
    laba[0] = rnd2(laba[0] * 100) + '%';
    laba[1] = rnd3(laba[1]);
    laba[2] = rnd3(laba[2]);
    if (laba.length > 3 && laba[3] < 1) {
        laba[3] = '/ ' + (laba.length > 3 ? laba[3] : 1);
    } else {
        laba.length = 3;
    }
    return `oklab(${laba.join(' ')})`;
};

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