def geologic_color_map(aquifers):
    """Map the aquifer codes to colors.

    This mapping of colors is based on the recommendations of numerous
    geologists and academics.

    Parameters
    ----------
    aquifers : list
        List of four-character aquifer abbreviation strings, as defined in
        Minnesota Geologic Survey's coding system.

    Returns
    -------
    geo_hue : list[str]
        List of the color category for each aquifer.

    geo_hue_order : list[str]
        List of geologically-related color categories in order.

    geo_palette : dict{str : str}
        Dictionary of colors for each geologically-related color category.

    """

    # C D I K M O P Q R U
    geo_hue_order = ["Qxxx", "Kxxx", "Dxxx", "Oxxx", "Cxxx", "Pxxx", "Mxxx", "other"]
    geo_palette = {
        "Qxxx": "gold",
        "Kxxx": "goldenrod",
        "Dxxx": "sienna",
        "Oxxx": "teal",
        "Cxxx": "limegreen",
        "Pxxx": "crimson",
        "Mxxx": "cornflowerblue",
        "other": "darkblue",
    }

    geo_hue = []
    for aqui in aquifers:
        if aqui[0] in {"Q", "K", "D", "O", "C", "P", "M"}:
            geo_hue.append(aqui[0] + "xxx")
        else:
            geo_hue.append("other")

    return (geo_hue, geo_hue_order, geo_palette)