GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Low-level hex-colour predicate — the single regex source for the codebase.

      ⚠️ The two callers deliberately disagree on shorthand #RGB, and that is preserved. Profile style JSON (style-validator-helpers.ts) requires the full #RRGGBB and says so in its error message; GeoJSON feature properties (geojson/feature-validator.ts) accept both and say so in theirs. Collapsing them into one predicate would silently either loosen the style contract or reject feature data that validates today — so the option is explicit rather than the divergence being re-implemented twice (S5 backlog B.2).

      Distinct from validateColor() below, which also accepts rgb()/rgba() and defers to CSS.supports — a much wider surface, and public API.

      Parameters

      • value: unknown

        Candidate colour.

      • options: { shorthand?: boolean } = {}
        • Optionalshorthand?: boolean

          Accept the 3-digit #RGB form. Defaults to false.

      Returns boolean