Hi!

I'm trying to mix two colors that are in CMY format, but I cannot seem to find the proper algorithm to do so.

Right now the script that I've made does the following:

  • Converts an HTML Hex code to RGB

  • Converts RGB to CMY (I was told that mixing the colors in CMY would yield the "truest" results.)

Now I just need to figure out how to mix two CMY color values properly. Could anyone help out? It'd be greatly appreciated. 🙂

    Depends on what format your colour is in. But to convert between CMY and RGB colour models you subtract each the R, G, and B components from whatever values they'd have in white and that would give you the C, M, and Y components. Converting back of course is vice-versa.

    That's the only difference. In RGB you start with black and add red, green and blue; in CMY you start with white and subtract red, green and blue (subtracting red is the same as adding cyan).

    What any of that has to do with one mixing being "more true" than another or not of course depends on how you measure "trueness".

      Hi,

      Wondering who advised you to do this..

      CMYK is NOT the color of choice for digital publishing (e.g., websites). So unless you are creating some sort of a pre-press system I would say. Do NOT use CMYK.

      Secondly.. Converting between CMYK and RGB and vise versa is NOT an exact & clear process. Many variables are to be taken into account, such as output devices, screen definitions etcetc.

      That being said.. A simple conversion could be reached like this (Assuming RGB values are between 0 and 255, and ignoring black as a brightness controlling colour): C = 255 - R; M = 255 - G; Y = 255 - B

        Thanks for the replies. 🙂

        In my tests, I'm not really noticing much difference between when I mix two CMY colors and two RGB colors (since I'm converting web based colors to begin with). Which makes sense, since it's just additive vs. subtractive. It's kind of silly now that I look at it.

        I know that CMY isn't for web. I think what I was trying to do was emulate something more like RYB... but biologically RYB doesn't really "work." Since I know it's an incorrect color scale. So, I think I'm just going to stick with RGB. The math is much simpler that way too, lol.

          Write a Reply...