UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

16 lines 264 B
export const labToLch = ({ l, a, b }) => { let h = (Math.atan2(b, a) * (180 / Math.PI) + 360) % 360; const c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)); if (Math.round(c * 10000) === 0) { h = Number.NaN; } return { l, c, h }; };