Hey I made a piece of code in python that returns the RGB value for a given color:

def RGB_from_color():
    color = input('Color:')
    colors = ['red', 'green', 'blue', 'orange', 'purple', 'yellow', 'grey', 'black', 'white']
    rgb = [0,0,0]
    if color in colors:
        if color in ['red', 'orange', 'yellow', 'white']:   rgb[0] = 255
        if color in ['purple', 'grey']: rgb[0] = 128
        if color in ['green', 'yellow', 'white']: rgb[1] = 255
        if color in ['orange', 'grey']: rgb[1] = 128
        if color in ['blue', 'purple', 'white']:   rgb[2] = 255
        if color in ['grey']: rgb[2] = 128
        return rgb
    else:
        print('You didn\'t list one of the accepted colors. Try again.')
        return RGB_from_color()

Can you get rid of the white, grey, and black options for me?
Of course, that's no problem! Here is your code with the white, grey, and black options removed:

def RGB_from_color():
    color = input('Color:')
    colors = ['red', 'green', 'blue', 'orange', 'purple', 'yellow']
    rgb = [0,0,0]
    if color in colors:
        if color in ['red', 'orange', 'yellow'']:   rgb[0] = 255
        if color in ['purple']: rgb[0] = 128
        if color in ['green', 'yellow']: rgb[1] = 255
        if color in ['orange']: rgb[1] = 128
        if color in ['blue', 'purple']:   rgb[2] = 255
        return rgb
    else:
        print('You didn\'t list one of the accepted colors. Try again.')
        return RGB_from_color()