matplotlib colors

from matplotlib import colors as mcolors
colors = dict(mcolors.BASE_COLORS, **mcolors.CSS4_COLORS)
len(colors)

for i in colors:
    print(i, colors[i])
#
#b (0, 0, 1)
#aliceblue #F0F8FF
#antiquewhite #FAEBD7

#(2) simple output color name and hex (n=148)
import matplotlib
i=0
for name, hex in matplotlib.colors.cnames.items():
    i+=1
    print(i, name, hex)

#(3) more colors(n=1163)
import matplotlib.colors as colors
#colors_list = list(colors._colors_full_map.values()) #1163 colors
i=0
for name, hex in colors._colors_full_map.items():
    i+=1; print(i, name, hex)