def color.hex.valid
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport 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)