Seaborn has an option to create nice color palettes. I wish to use these palettes to generate colors that work well together in a map where countries are shaded according to som
If by "6 digit code" you mean a hex code, you can also do:
pal = sns.color_palette(...) pal.as_hex()