Talk:CMYK color model

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Color (Rated Start-class, High-importance)
WikiProject icon This article is supported by WikiProject Color, a project that provides a central approach to color-related subjects on Wikipedia. Help us improve articles to good and 1.0 standards; visit the wikiproject page for more details.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.

Old discussion[edit]

Adopted orphan redirects for searching: CMYK colour model

Can you convert the following RGB coordinates to CMYK??

Color    RGB         CMYK
Gray     128 128 128
Black    0   0   0
White    255 255 255
Red      255 0   128
Orange   255 83  0
Yellow   255 255 0
Lime     83  255 0
Green    0   255 128
Sea blue 0   172 255
Blue     0   0   255
Purple   172 0   255 02:21, 2 Apr 2004 (UTC)

Note: (or note to self :-P ) we need an RGB -> CMYK conversion formula, like on HSV color space , that'd be handy. Kim Bruning 12:38, 3 Apr 2004 (UTC)

Okay, let's snarf some formulas off of :

(mathematics isn't copyrightable AFAIK, and I'll be rewriting anyway :-) ) and then rewrite them to 1 form:

// RGB -> CMY
//RGB values = From 0 to 255
// CMY values = from 0 to 1

C = 1 - ( R / 255 )
M = 1 - ( G / 255 )
Y = 1 - ( B / 255 )
//CMY values = From 0 to 1 

// and CMY-> CMYK
var_K = 1 

if ( C < var_K )   var_K = C
if ( M < var_K )   var_K = M
if ( Y < var_K )   var_K = Y

C = ( C - var_K ) / ( 1 - var_K )
M = ( M - var_K ) / ( 1 - var_K )
Y = ( Y - var_K ) / ( 1 - var_K )
K = var_K

Okay, so we'd better write that out tidily :-)

so let's see

C_{CMY, float} = 1 - ( R / 255 ) \\
M_{CMY, float} = 1 - ( G / 255 ) \\
Y_{CMY, float} = 1 - ( B / 255 ) 

C_{CMY, float}, &
\mbox{if } C_{CMY, float} < var_K \\
M_{CMY,float}, &
\mbox{if } M_{CMY, float} < var_K \\
Y_{CMY,float}, &
\mbox{if } Y_{CMY, float} < var_K
\end{matrix} \right.

C_{CMYK, float} = ( C_{CMY, float} - var_K ) / ( 1 - var_K ) \\
M_{CMYK, float} = ( M_{CMY, float} - var_K ) / ( 1 - var_K ) \\
Y_{CMYK, float} = ( Y_{CMY, float} - var_K ) / ( 1 - var_K ) \\
K_{CMYK, float} = var_K 


for: C,M,Y,K \in ( \mathbb{Z}, [0,255] )

we can simply do:

C = 255 \cdot C_{CMYK, float} \\
M = 255 \cdot M_{CMYK, float} \\
Y = 255 \cdot Y_{CMYK, float} \\
K = 255 \cdot K_{CMYK, float} 

Okay, as a sucky biologist, my math sucks. Can a real mathematician look this over before adding it to the main article? Else I'll add it in a week or so. Note that I really don't like the float inbetween step, and it's not really nescesary :-)

Kim Bruning 13:21, 3 Apr 2004 (UTC)

Oh heck, let's be bold and add it, some mathematician will just come along and simplify the float step I'm sure :-) Kim Bruning 13:27, 3 Apr 2004 (UTC)

Ugh, I think I made some slight errors converting from algorithm to formula. Um I'll leave as is for now, some mathematician can pick up the pieces :-/ Sorry! Kim Bruning 13:32, 3 Apr 2004 (UTC)

Here's rewriting this so it's a little neater. This is going off that site before:
Converting CMYK -> RGB = CMYK -> CMY -> RGB
tCMYK ∈ [0,1]4 is the CMYK quadruple, tCMY ∈ [0,1]3 is the CMY triple, and tRGB ∈ [0, 255]3 is the RGB triple. Then:
t_{CMYK} = (c, m, y, k), \mathrm{then}\\
t_{CMY} = (c', m', y') = (c (1-k)+k, m (1-k)+k, y (1-k)+k )\ \mathrm{and}\\
t_{RGB} = (r, g, b) = (255(1 - c'), 255(1-m'), 255(1-y'))\\
Converting RGB -> CMY, with the same color vectors as before
t_{RGB} = (r, g, b)\\
t_{CMY} = (c', m', y') = (1-r/255, 1-g/255, 1-b/255)\\
t_{CMYK} = (c, m, y, k) = (c-\mathrm{min}(c, m, y), m-\mathrm{min}(c, m, y), y-\mathrm{min}(c, m, y), \mathrm{min}(c, m, y))\\
Dysprosia 14:05, 3 Apr 2004 (UTC)

Thanks, looks tidier at least! On computers, CYMK is usually represented in 32 bits (4 bytes: C, M , Y, K), so each C, M, Y, K value is an integer from 0 to 255, and not a floating point value from 0 to 1 as was stated on the referenced webpage. Cutting out the floating point values would improve the formula further. (something to sort out in my copious free time :-) Kim Bruning 14:26, 3 Apr 2004 (UTC)

  • Can you put the coordinates in the above table that already shows RGB?? 15:36, 3 Apr 2004 (UTC)
    • Instead of giving you a fish, we gave you a fishing rod. :-) Calculate the cmyk values using the formulas, or the webpage or what have you, and multiply by 255 (and round off) to get the compuer representation. Kim Bruning 16:00, 3 Apr 2004 (UTC)
      • What do fish and fishing rods have to do with RGB and CMYK?? Is this just an expression?? What does it mean?? Does Wikipedia have an article for expressions like this?? 16:55, 3 Apr 2004 (UTC)
        • "give a man to fish, and he will eat for a day, teach a man to fish, and he will eat for the rest of his life". The idea is that we just explained how you can figure out cmyk values for yourself, into perpetuity :-) Unfortunately the formula given by dysprosia gives values from 0 to 1, and we want to scale that to 0-255. (so just multiply by 255, easy enough). Well I'll do some examples to see if the formula is actually correct...

some tests[edit]

(128, 128, 128)_{RGB} = (0, 0, 0, 0.5)_{CMYK} = (0,0,0,128)_{CMYK, scaled to bytes}\\ 
(255, 0, 0)_{RGB} = (0, 1, 1, 0)_{CMYK} = (0,255,255,0)_{CMYK, scaled to bytes}\\
(255, 255, 0)_{RGB} = (0, 0, 1, 0)_{CMYK} = (0,0,255,0)_{CMYK, scaled to bytes}

Wow! This formula is really easy to use too! :-) I'm sure there's a way to skip the float phase , but this is nice :-)

  • But 255 0 0 was not among the colors in the above table. 18:20, 3 Apr 2004 (UTC)
    • But I'm not going to calculate your table for you, I was figuring some edge cases to see if the formula actually works. Kim Bruning 18:33, 3 Apr 2004 (UTC)

Hmm, note I was doing mental arithmetic, so values are rounded off. Kim Bruning 21:48, 3 Apr 2004 (UTC)

okay, one example for, though really wikipedia isn't for this. Note that your value for red is really weird?

We're using "red, green blue" so:

red = (255, 0, 0)_{RGB}\\
green = (0, 255, 0)_{RGB}\\
blue = (0, 0, 255)_{RGB}

tell you what, let's find blue in CMYK

  • disprosia said:

t_{RGB} = (r, g, b)\\
t_{CMY} = (c', m', y') = (1-r/255, 1-g/255, 1-b/255)\\
t_{CMYK} = (c, m, y, k) = (c-\mathrm{min}(c, m, y), m-\mathrm{min}(c, m, y), y-\mathrm{min}(c, m, y), \mathrm{min}(c, m, y))\\

  • Okay, well,  blue = (0, 0, 255)_{RGB}

so we do:

 t_{RGB} = (0, 0, 255)
t_{CMY} = (c', m', y') = (1-0/255, 1-0/255, 1-255/255)
t_{CMY} = (c', m', y') = (1, 1, 0)
t_{CMYK} = (c, m, y, k) = (c-\mathrm{min}(1, 1, 0), m-\mathrm{min}(1, 1, 0), y-\mathrm{min}(1, 1, 0), \mathrm{min}(1, 1, 0))

  • Well ...  \mathrm{min}(1, 1, 0)=0 , so:

t_{CMYK} = (c, m, y, k) = (1-0, 1-0, 0-0, 0)
t_{CMYK} = (c, m, y, k) = (1, 1, 0, 0)

  • scaling:

 t_{CMYK, scaled}=255 \cdot t_{CMYK}

  • So in the end we get:

 t_{CMYK, scaled}=(255,255,0,0)

Which I happen to know is the right value for blue. :-)

Easily understood[edit]

Doesn't anyone think this page should be made more simpler so people can understand or add more explanations to the algorithm-ishs given in the end? My thought since I still do not understand how. -- WB 02:30, Mar 18, 2005 (UTC)

I think the algorithms given should be removed, as they are of little practical use. They do not reflect the real-world conversions actually needed, and by putting them into a Wikipedia article, it adds to the confusion and errors which can produce very expensive printing mistakes. Views? Notinasnaid 09:34, 11 Apr 2005 (UTC)
It is less productive to remove inaccurate algorithms altogether as opposed to improving the algorithms in the first place. Dysprosia 12:19, 11 Apr 2005 (UTC)
The crucial point is that there is no algorithm. There is no single conversion from RGB to CMYK, so - much as people yearn for there to be a simple algorithm - it is doing a disservice to put one there. Notinasnaid 16:31, 11 Apr 2005 (UTC)
I have tried to put some background in the new article absolute color space. Neither RGB nor CMYK are, by themselves, absolute, so there is no single conversion between them. Notinasnaid 20:27, 11 Apr 2005 (UTC)

It seems to me that the lack of reversibility in RGB to CMYK to RGB conversions isn't an issue which should prevent presentation of an algorithm. Such an algorithm is a necessity in many applications; for example, rendering an RGB-based image into CMYK inks on paper. CoyneT 00:54, 12 Apr 2005 (UTC)

To my mind, that's exactly the reason to not have it, because, frankly, it's rubbish. People have written software using this algorithm, and the results of the conversion don't really satisfy anyone, because the colors are different. Notinasnaid 07:43, 12 Apr 2005 (UTC)
The discretionary note added is sufficient enough. Those who want to make use of such an algorithm are warned for its use, and those who need something professional will be warned of the consequences for using the algorithm. Dysprosia 08:00, 12 Apr 2005 (UTC)
That makes sense. If I ever manage to find a way to express how it should be done, I'll add that too. (It won't be an algorithm). Notinasnaid 08:28, 12 Apr 2005 (UTC)

Requested move[edit]

The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section.

The result of the move request was: not moved Armbrust The Homunculus 08:48, 15 October 2013 (UTC)

CMYK color modelCMYK – This article is the primary topic for "CMYK", which already redirects here. There is only one other topic, CMYK (EP), which is disambiguated by a hatnote. Per WP:PRECISION: "titles should be precise enough to unambiguously define the topical scope of the article, but no more precise than that." The redirect to "CMYK color model" is unnecessarily over-precise. Relisted. BDD (talk) 23:08, 8 October 2013 (UTC) sroc 💬 14:14, 27 September 2013 (UTC)

  • Oppose: The current title is more readable/natural/explanatory and has a nice consistency with RGB color model and Color model (and RGB color space has nice consistency with CIE 1931 color space). —BarrelProof (talk) 14:40, 27 September 2013 (UTC)
  • Oppose: The use of "Color Model" in the title is necessary. Unless one already knows the CMYK is one of a number of color models, it is necessary information to define the scope. Truncating it to merely CMYK would presume knowledge not necessarily known to the audience. Eggishorn (talk) 23:53, 28 September 2013 (UTC)
  • Oppose. "CMYK" is too short to be well recognized by people aware of the CMYK color scheme. --SmokeyJoe (talk) 05:24, 14 October 2013 (UTC)
The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.


Under the heading, "Benefits of using black ink" we have: "In traditional preparation of color separations, a red keyline on the black line art marked the outline of solid or tint color areas. In some cases a black keyline was used when it served as both a color indicator and an outline to be printed in black. Because usually the black plate contained the keyline, the K in CMYK represents the keyline or black plate, also sometimes called the key plate."

I found this quite confusing. I'm having trouble finding out what keyline means in this context. At the top of the article we have: "The "K" in CMYK stands for key because in four-color printing, cyan, magenta, and yellow printing plates are carefully keyed, or aligned, with the key of the black key plate. Some sources suggest that the "K" in CMYK comes from the last letter in "black" and was chosen because B already means blue.[1][2] The CMYK model works by partially or entirely masking colors on a lighter, usually white, background. The ink reduces the light that would otherwise be reflected. Such a model is called subtractive because inks "subtract" brightness from white."

This directly states that the "K" stands for for either "key" as in "key plate" or that the "K" stands for the last letter of the word "black". There is no mention of keyline. What is keyline? Could we replace references to "keyline" with "key" if they are the same thing?

Thank you for reading. (talk) 15:32, 7 November 2013 (UTC)

Black is the “key” ink, on the “key” plate. “K” stands for “key” (the thing about standing for the last letter in “black” is from later sources looking to retroactively justify the acronym). The “keyline” would be the physical line on the page, used to align the other plates “Key” and “keyline” aren’t the same thing. –jacobolus (t) 01:13, 12 November 2013 (UTC)
Oh, here. See keyline. –jacobolus (t) 01:42, 12 November 2013 (UTC)

Diagram for gamut[edit]

Comparison of some RGB and CMYK colour gamuts on a CIE 1931 xy chromaticity diagram

This article could use a diagram showing a typical gamut, like sRGB has. -- Beland (talk) 19:23, 7 April 2014 (UTC)

Yes check.svg Done as on the right. cmɢʟeeτaʟκ 20:51, 13 April 2014 (UTC)