【问题标题】:What is a "valid IM color"?什么是“有效的 IM 颜色”?
【发布时间】:2018-11-15 12:10:47
【问题描述】:

我在 bash 脚本中找到了以下文档,该脚本是为与某些名为“imagemagick”的软件一起使用而编写的

# USAGE: multicrop2 [-c coords] [-b bcolor] [more options, blah blah,...]
# [... snip ...]
# -b     bcolor        background color to use instead of option -c;
#                      any valid IM color; default is to use option -c

我无法理解代码作者认为什么是“有效的 IM 颜色”。我猜“IM”只是“图像”的缩写,但可能是“即时消息”或其他意思。你怎么看?

RGB 的十六进制代码的低字节为蓝色,中间字节为绿色,高字节为红色,但我不确定它们是否对颜色使用标准 RGB 编码。

【问题讨论】:

  • IM=imagemagick,如任何有效的 Image Magick 颜色。它有文档,您可以通过Google 找到它,它还可以告诉您*一些名为“imagemagick”的软件是什么以及它的作用。

标签: graphics colors imagemagick color-codes


【解决方案1】:

Multicrop2 是我的脚本。有效的 ImageMagick 颜色是 ImageMagick 可识别的任何配色方案,例如 rgb、hex、cmyk、hsl,甚至是其文档中指定格式的颜色名称,尤其是在 http://www.imagemagick.org/script/color.php 中指定的格式。我的脚本中有太多无法列出。我经常提到这个链接,但显然在这种情况下我没有。但大多数 ImageMagick 用户都知道其典型的配色方案。 ImageMagick 用户大多知道 IM 是 ImageMagick 的缩写。颜色大部分遵循 CSS 样式指南。带有#、空格或括号的颜色需要被引用,至少在类 Unix 系统上是这样。颜色名称不需要引用。向我的脚本和 ImageMagick 的新手道歉。

例子:

rgb(255, 0, 0)                          range 0 - 255
rgba(255, 0, 0, 1.0)                    the same, with an explicit alpha value
rgb(100%, 0%, 0%)                       range 0.0% - 100.0%
rgba(100%, 0%, 0%, 1.0)                 the same, with an explicit alpha value
#ff0000                                 #rrggbb
#ff0000ff                               #rrggbbaa
gray50                                  near mid gray
gray(127)                               near mid gray
gray(50%)                               mid gray
graya(50%, 0.5)                         semi-transparent mid gray
hsb(120, 100%,  100%)                   full green in hsb
hsba(120, 100%,  100%,  1.0)            the same, with an alpha value of 1.0
hsb(120, 255,  255)                     full green in hsb
hsba(120, 255,  255,  1.0)              the same, with an alpha value of 1.0
hsl(120, 100%,  50%)                    full green in hsl
hsla(120, 100%,  50%,  1.0)             the same, with an alpha value of 1.0
hsl(120, 255,  127.5)                   full green in hsl
hsla(120, 255,  127.5,  1.0)            the same, with an alpha value of 1.0
cielab(62.253188, 23.950124, 48.410653)
icc-color(cmyk, 0.11, 0.48, 0.83, 0.00)  cymk
icc-color(rgb, 1, 0, 0)                  linear rgb
icc-color(rgb, red)                      linear rgb
icc-color(lineargray, 0.5)               linear gray
icc-color(srgb, 1, 0, 0)                 non-linear rgb
icc-color(srgb, red)                     non-linear rgb
icc-color(gray, 0.5)                     non-linear gray

【讨论】:

    猜你喜欢
    • 2012-07-17
    • 2014-02-02
    • 1970-01-01
    • 2012-06-19
    • 2016-05-08
    • 1970-01-01
    • 2020-06-20
    • 1970-01-01
    • 2011-11-03
    相关资源
    最近更新 更多