def color.hex.valid

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

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

780def color.hex.valid(s: String) -> Bool:
781  match s:
782    case SNil{}: True{}
783    case SCon{Chr{c}, rest}:
784      +ch = c
785      (U.digit(ch) || (U32.is_ge(ch, 97) && U32.is_le(ch, 102))) && color.hex.valid(rest)

Uses (8)

Used by (1)