How can I find the HEX representation of Altair default color palette? Every plotting tool has its strengths & weaknesses and I typically end up generating visualizations consist of Seaborn + Altair. I would like to match Altair colors in Seaborn. For Seaborn, you can get the relevant HEX color representation of color_palette as follows and was wondering how can I get similar color information in Altair.
import seaborn as sns
sns.color_palette('Set2').as_hex()
Out[131]:
['#66c2a5',
'#fc8d62',
'#8da0cb',
'#e78ac3',
'#a6d854',
'#ffd92f',
'#e5c494',
'#b3b3b3']
It seems like the default color palette of Altair (from the Vega-Lite renderer) is quite similar to Category 10:
#1f77b4, #ff7f0e, #2ca02c, #d62728, #9467bd,
#8c564b, #e377c2, #7f7f7f, #bcbd22, #17becf
The details of different palettes can be found here: https://d3-wiki.readthedocs.io/zh_CN/master/Ordinal-Scales/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With