Packages

Advanced configurable navigation component for Phoenix LiveView with native DaisyUI integration, Tailwind CSS support, permissions filtering, dropdowns, mega menus, and modern responsive design. Optimized for Phoenix 1.8+ and LiveView 1.1+.

Current section

Files

Jump to
navbuddy assets node_modules culori src lab65 convertLab65ToXyz65.js
Raw

assets/node_modules/culori/src/lab65/convertLab65ToXyz65.js

import { k, e } from '../xyz65/constants.js';
import { D65 } from '../constants.js';
let fn = v => (Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k);
const convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
let fy = (l + 16) / 116;
let fx = a / 500 + fy;
let fz = fy - b / 200;
let res = {
mode: 'xyz65',
x: fn(fx) * D65.X,
y: fn(fy) * D65.Y,
z: fn(fz) * D65.Z
};
if (alpha !== undefined) {
res.alpha = alpha;
}
return res;
};
export default convertLab65ToXyz65;