MCPcopy
hub / github.com/omgovich/colord / roundLcha

Function roundLcha

src/colorModels/lch.ts:18–23  ·  view source on GitHub ↗
(laba: LchaColor)

Source from the content-addressed store, hash-verified

16});
17
18export const roundLcha = (laba: LchaColor): LchaColor => ({
19 l: round(laba.l, 2),
20 c: round(laba.c, 2),
21 h: round(laba.h, 2),
22 a: round(laba.a, ALPHA_PRECISION),
23});
24
25export const parseLcha = ({ l, c, h, a = 1 }: InputObject): RgbaColor | null => {
26 if (!isPresent(l) || !isPresent(c) || !isPresent(h)) return null;

Callers 2

rgbaToLchaStringFunction · 0.90
lchPluginFunction · 0.90

Calls 1

roundFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…