def get_star_color(spectral):
    """ Obtain RGB values from the spectral type of a star """

    rgb = {
        "O": (128, 128, 255),
        "W": (128, 128, 255),  # Wolf-Rayet
        "B": (160, 160, 255),
        "A": (192, 192, 255),
        "F": (224, 224, 255),
        "G": (255, 192, 192),
        "K": (255, 160, 160),
        "k": (255, 160, 160),
        "R": (255, 160, 160),
        "M": (255, 128, 128),
        "N": (255, 128, 128),
        "S": (255, 128, 128),
        "s": (255, 128, 128),
        "C": (255, 128, 128),  # carbon star
    }

    color = rgb["G"]  # default

    type = spectral[0]
    if type == "(" or type == "D":
        type = spectral[1]

    if type in rgb:
        color = rgb[type]

    return color