RGB值等于CMYK百分比吗?
RGB数值等于CMYK百分比吗?
详细信息:
我有一些 rgb 值,例如 r-212 g-231 b-211,在 Photoshop 中,其显示 cmyk 为 40% 34% 80% 0%。我想知道我们能否通过给出 cmyk 百分比来获得相同的 rgb 值?因为我必须在某些特定应用程序中以百分比形式使用 rgb,但我没有在 Photoshop 的帮助下得到它...请帮助简而言之告诉我, 是否可以在 Photoshop 的帮助下获得百分比的 RGB 值?
is rgb numeric values equals to cmyk percentage?
for detail :
i have some rgb values for example r-212 g-231 b-211 and in Photoshop its showing cmyk as 40% 34% 80% 0%.i want to know can we get the same rgb values by giving cmyk percentage? because i have to use rgb in percentage in some particular application but i am not getting it with the help of photoshop...Please help in short tell me,
is it possible to get rgb values in percentage with the help of photoshop?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你的问题不太清楚,但是:不,rgb 和 cmyk 不一样,看看这张图片,看看它们可以表示的不同颜色空间(并且,显然,rgb 由 3 个值组成,cmyk 由 4 个值组成) ):
your question isn't realy clear, but: no, rgb and cmyk are not the same, take a look at this picture to see the different color space they can represent (and, obviously, rgb consists of 3 values, cmyk consists of 4):
您可以近似计算 RGB 和 CMYK 色彩空间,但它不会完全准确或双向。 这两种色彩空间之间存在许多差异此处相关,包括它们各自的色域(参见 oezi 答案中的图表)、加法与减法模型以及 CMYK 空间中黑色(关键)的存在。
以下代码(任意使用 C# 编写;随意转换为您选择的语言):
如果您只是对将颜色从 RGB 表示转换为 CMYK 表示的简单方法感兴趣,则可以使用 决定这个简单的近似是否会产生“足够接近”满足您的需求的结果。 要认识到的最重要的一点是,真正的转换完全取决于物理设备/过程,并且需要为每个设备(显示 RGB 的显示器、打印 CMYK 的打印机以及承印物)精确校准颜色配置文件。 这有助于解释为什么上述算法
(或您可能自己实现的任何其他算法)永远不会与 Photoshop 返回的结果相匹配,Photoshop 使用颜色配置文件和一些其他专有算法来处理它的转换。如果这种准确度确实很重要,您可以考虑使用类似 Windows 颜色管理 API 为您处理转换,这将自动应用当前的颜色配置文件,但您可能会发现这些结果也不完全匹配 Photoshop 的结果。
底线是颜色是主观的。正如我在开始时提到的,即使您克服了准确性障碍,您仍然不会有双向的转换过程。即使在 Photoshop 中,您也无法在不丢失或更改某些颜色信息的情况下将图像从 RGB 转换为 CMYK,然后再转换回来。
编辑:您在评论中多次提到您只需要“以百分比表示的 RGB 值”。我认为这意味着 CMYK 百分比,但我认为如果您只想将 RGB 分量的标准 0-255 值转换为 RGB 百分比,那么值得指出,您可以将每个值除以 255(最大值),然后乘以 100。例如:
You can approximate a conversion between the RGB and CMYK color spaces, but it's not going to be completely accurate or bidirectional. There are numerous differences between the two color spaces that become relevant here, including their respective gamuts (see the diagram in oezi's answer), the additive vs. subtractive models, and the presence of black (key) in the CMYK space.
If you're merely interested in a simple way to convert a color from its RGB to CMYK representation, you can use the following code (arbitrarily in C#; feel free to convert to the language of your choice):
But you'll have to decide if this simple approximation will produce results that are "close enough" for your needs. The most important thing to realize is that a true conversion is entirely dependent upon the physical device/process and requires accurately calibrated color profiles for each of your devices (the monitor displaying the RGB, the printer printing the CMYK, and the substrate receiving the CMYK).
This helps to explain why the above algorithm (or any other that you might implement on your own) is never going to match the results returned by Photoshop, which uses color profiles and some additional proprietary algorithms to handle its conversion. If this degree of accuracy is truly important, you could consider using something like the Windows Color Management APIs to handle the conversion for you, which will automatically apply the current color profile, but you'll likely find that those results don't exactly match Photoshop's either.
The bottom line is that color is subjective. As I mentioned in the beginning, even if you overcome the accuracy hurdle, you will still not have a conversion process that is bidirectional. Even in Photoshop, you can't convert an image from RGB to CMYK and then back again without losing or altering some of the color information.
EDIT: You mention a couple of times in your comments that you just want "RGB values in percentage." I assume that this means CMYK percentages, but I suppose that it's worth pointing out if you just want to convert the standard 0-255 values for RGB components to an RGB percentage, you can just divide each value by 255 (the max), and then multiply by 100. So, for example:
不完全是。 公式 比这更复杂一些,因为 CMYK 的成分比 RGB 更多。
Not entirely. The formula is a little more complex than that, since CMYK has more components than RGB.