Imagine we how some basic colors:
RED = Color ((196, 2, 51), \"RED\")
ORANGE = Color ((255, 165, 0), \"ORANGE\")
YELLOW = Color ((255, 205, 0), \"YELLOW\")
GREEN
The colors module of my Goulib library does this fairly well, and much more. It defines a Color class that can be inited from several color spaces, and grouped in a Palette dictionary. Several palettes are predefined, notably one that is indexed by the html/matplotlib names. Each Color automagically recieves a name from the index of the nearest color in this palette, measured in Lab space (deltaE)
see demo here http://nbviewer.jupyter.org/github/Goulu/Goulib/blob/master/notebooks/colors.ipynb