import { clamp0 } from "@thi.ng/math/interval" ; import { fract } from "@thi.ng/math/prec" ; import type { ReadonlyColor } from "../api.js" ; import { FF , PC } from "../api/constants.js" ; import { __ensureAlpha } from "../internal/ensure.js" ; remarks param src export const lchCss = ( src ) => { const l = PC ( clamp0 ( src [ 0 ] ) ) ; const c = FF ( clamp0 ( src [ 1 ] ) * 100 ) ; const h = FF ( fract ( src [ 2 ] ) * 360 ) ; const a = __ensureAlpha ( src [ 3 ] ) ; return `lch(${ l } ${ c } ${ h }` + ( a < 1 ? `/${ FF ( a ) })` : ")" ) ; } ;