【问题标题】:To show hex color codes in batch [closed]批量显示十六进制颜色代码[关闭]
【发布时间】:2019-04-24 08:17:57
【问题描述】:

我有一些十六进制颜色代码:

#ff9b9b
#ff5656
#ff0202
#ad0000
#871515

我想同时显示对应的颜色作为调色板方便选择我想要的颜色。

有没有推荐的在线工具或者我们可以在命令行中做? 有些工具只能同时显示一种颜色,但我想同时显示几种颜色。

非常感谢!

【问题讨论】:

    标签: python r bash colors hex


    【解决方案1】:

    如果你想要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)
    

    【讨论】:

      猜你喜欢
      • 2011-09-20
      • 2011-10-25
      • 2017-10-01
      • 2014-05-02
      • 2014-12-05
      • 1970-01-01
      • 2019-11-28
      • 2017-04-11
      • 1970-01-01
      相关资源
      最近更新 更多