matplotlib:将colormap转换为柔和颜色
我目前正在使用 blues ,purples
,greens
)。但是,我更喜欢柔软,“柔和”的音调。我如何能软化现有的菌落,或者也许为此目的使用更合适的菌落?
备注:我的问题本质上是该版本的python版本: r转换颜色为柔和的颜色 。
I am currently using color shades from single color matplotlib colormaps (like Blues
, Purples
, Greens
). However I would prefer softer, "pastel" tones. How could I soften the existing colormaps or perhaps there are more appropriate colormaps to use for this purpose?
Remark: my question is essentially a python version of this one: R convert colors to pastel colors.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一项研究,我采用了画家使用的解决方案来获取柔和的颜色:将颜色与白色油漆混合。用Pythonic术语,如果我想选择,例如
n
蓝色阴影,我将c
控制“柔软/柔和”的程度。因此,对于c = 0
纯色是对于

c = 0.2
对于

c = 0.4
After some research I have adopted the solution used by painters to obtain pastel colors: mixing the color with white paint. In pythonic terms, if I want to chose, e.g.,
n
shades of blue, I takewhere

c
controls the degree of "softness/pastelness". Thus, forc=0
the pure color isfor

c=0.2
for

c=0.4