GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Turns a CSS colour into a key safe for a MapLibre image id.

      Runs of non-alphanumeric characters collapse to a single -, so the key can never itself contain the -- separator: #6A1B9A6a1b9a, rgb(255, 0, 0)rgb-255-0-0. Collapsing runs (rather than stripping them) keeps distinct colours distinct — stripping would fold rgb(255,0,0) and rgb(25,50,0) onto the same key.

      Parameters

      • color: string

        Any CSS colour string.

      Returns string | null

      The id-safe key, or null when nothing usable remains.