seaborn里提供了很多默认的颜色库,比如
import seaborn as sns
sns.set_palette("husl")
husl里有好几种颜色,我怎么可以获取每个颜色的rgb数值呢?
1个回答
显示RGB数值
sns.color_palette("husl")
[(0.9677975592919913, 0.44127456009157356, 0.5358103155058701),
(0.7350228985632719, 0.5952719904750953, 0.1944419133847522),
(0.3126890019504329, 0.6928754610296064, 0.1923704830330379),
(0.21044753832183283, 0.6773105080456748, 0.6433941168468681),
(0.23299120924703914, 0.639586552066035, 0.9260706093977744),
(0.9082572436765556, 0.40195790729656516, 0.9576909250290225)]
显示颜色盘
sns.palplot(sns.color_palette("husl"))
谢谢
-
一棵海草
2019-08-25 12:01