def color.hsl.channel

gralha-svg-render@0.1.0.1 · svg.bend:733

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

733def color.hsl.channel(+h: F32, +s: F32, +l: F32, n: F32) -> F32:
734  +turn = (n + h / 30.0 : F32)
735  +k = (turn - 12.0 * F32.floor((turn / 12.0 : F32)) : F32)
736  (l - s * U.min(l, (1.0 - l : F32)) * U.max(F32.neg(1.0), U.min(U.min((k - 3.0 : F32), (9.0 - k : F32)), 1.0)) : F32)

Uses (9)

Used by (1)