【发布时间】:2019-04-24 08:17:57
【问题描述】:
我有一些十六进制颜色代码:
#ff9b9b
#ff5656
#ff0202
#ad0000
#871515
我想同时显示对应的颜色作为调色板方便选择我想要的颜色。
有没有推荐的在线工具或者我们可以在命令行中做? 有些工具只能同时显示一种颜色,但我想同时显示几种颜色。
非常感谢!
【问题讨论】:
我有一些十六进制颜色代码:
#ff9b9b
#ff5656
#ff0202
#ad0000
#871515
我想同时显示对应的颜色作为调色板方便选择我想要的颜色。
有没有推荐的在线工具或者我们可以在命令行中做? 有些工具只能同时显示一种颜色,但我想同时显示几种颜色。
非常感谢!
【问题讨论】:
如果你想要python代码,你可以使用colored,这里是你选择字体颜色和背景颜色的例子。
from colored import fg, bg, attr
color = fg('#C0C0C0') + bg('#00005f') # create font and background color
res = attr('reset') # adding that to string that we print reset current colors
print(color + "Hello World !!!" + res)
【讨论】: