import toml
from pathlib import Path


def get_colordata(name):
    """

    Load color map data from setting file.

    Parameters
    ----------
    name : str
        Colormap name. Currently, ``Dark_rainbow``, ``rainbow2``, ``sls_SAOImage``,
        ``rainbow3``, ``rainbow_SAOImage``, ``b_SAOImage``, ``spectrum_Starlink``,
        and ``Hue_sat_value2`` are supported.
    """
    color = toml.load(open(Path(__file__).parent / "colordata" / "cmapdata.toml"))
    color_numbers = color["table"][name]
    return color_numbers