MCPcopy Create free account
hub / github.com/alignoth/alignoth / Cf

Function Cf

resources/vega.min.js:9336–9353  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

9334 Ef = 3 * Mf * Mf,
9335 Df = Mf * Mf * Mf;
9336 function Cf(t) {
9337 if (t instanceof Sf) return new Sf(t.l, t.a, t.b, t.opacity);
9338 if (t instanceof Of) return Rf(t);
9339 t instanceof af || (t = rf(t));
9340 var e,
9341 n,
9342 r = zf(t.r),
9343 i = zf(t.g),
9344 o = zf(t.b),
9345 a = $f((0.2225045 * r + 0.7168786 * i + 0.0606169 * o) / wf);
9346 return (
9347 r === i && i === o
9348 ? (e = n = a)
9349 : ((e = $f((0.4360747 * r + 0.3850649 * i + 0.1430804 * o) / bf)),
9350 (n = $f((0.0139322 * r + 0.0971045 * i + 0.7141733 * o) / kf))),
9351 new Sf(116 * a - 16, 500 * (e - a), 200 * (a - n), t.opacity)
9352 );
9353 }
9354 function Ff(t, e, n, r) {
9355 return 1 === arguments.length ? Cf(t) : new Sf(t, e, n, null == r ? 1 : r);
9356 }

Callers 2

FfFunction · 0.70
NfFunction · 0.70

Calls 4

RfFunction · 0.70
rfFunction · 0.70
zfFunction · 0.70
$fFunction · 0.70

Tested by

no test coverage detected