import Color from '../Color.mjs';
import index from './index.mjs';

const { sqrt: sqrt$3, pow: pow$5 } = Math;

const lrgb = (col1, col2, f) => {
    const [x1, y1, z1] = col1._rgb;
    const [x2, y2, z2] = col2._rgb;
    return new Color(
        sqrt$3(pow$5(x1, 2) * (1 - f) + pow$5(x2, 2) * f),
        sqrt$3(pow$5(y1, 2) * (1 - f) + pow$5(y2, 2) * f),
        sqrt$3(pow$5(z1, 2) * (1 - f) + pow$5(z2, 2) * f),
        'rgb'
    );
};

// register interpolator
index.lrgb = lrgb;
//# sourceMappingURL=lrgb.mjs.map
