import webcolors
import pandas as pd
pd.options.display.max_columns = 7
CSS3_NAMES_TO_HEX = pd.DataFrame.from_dict(webcolors.CSS3_NAMES_TO_HEX, orient = "index")
CSS3_NAMES_TO_HEX.reset_index(inplace=True)
CSS3_NAMES_TO_HEX.rename(columns = {"index":"color", 0:"hex"}, inplace=True)
CSS3_NAMES_TO_HEX.to_csv("C:\\Users\\chris\\Desktop\\CSS3_NAMES_TO_HEX.csv", index=False)