简体   繁体   English

PIL图像库Python

[英]PIL Image Library Python

How can I set percentage values (0% to 100%) on CYMK format instead of default values (0 to 255)? 如何在CYMK格式上设置百分比值(0%到100%),而不是默认值(0到255)?

Currently full ink black color is: 当前全墨黑色是:

Image.new("CMYK", (width, height), (0, 0, 0, 255))

I want: 我想要:

Image.new("CMYK", (width, height), (0, 0, 0, 100))

I see here that for RGB, you can specify in percentages. 在这里看到,对于RGB,您可以指定百分比。

RGB functions, given as “rgb(red, green, blue)” where the colour values are integers in the range 0 to 255. Alternatively, the color values can be given as three percentages (0% to 100%). RGB函数,以“ rgb(红色,绿色,蓝色)”形式给出,其中颜色值是0到255范围内的整数。或者,颜色值可以给出三个百分比(0%到100%)。 For example, “rgb(255,0,0)” and “rgb(100%,0%,0%)” both specify pure red. 例如,“ rgb(255,0,0)”和“ rgb(100%,0%,0%)”都指定纯红色。

Can you also try this for CMYK? 您也可以尝试CMYK吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM