UNPKG

@atlaskit/adf-schema

Version:

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

15 lines 320 B
export var labToLch = function labToLch(_ref) { var l = _ref.l, a = _ref.a, b = _ref.b; var h = (Math.atan2(b, a) * (180 / Math.PI) + 360) % 360; var c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)); if (Math.round(c * 10000) === 0) { h = Number.NaN; } return { l: l, c: c, h: h }; };