• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Formula to convert CMYK to RGB or RGB to CMYK

New Here ,
Apr 22, 2010 Apr 22, 2010

Copy link to clipboard

Copied

Hi All,

I am working on indesign, I want to convert the CMYK values to RGB or vice versa. I dont want to run any script and changes the color spaces of idml file. I can do extract and parse the idml file so that I have either CMYK values or RGB. I want to convert from CMYK to RGB or RGB to CMYK.

I got some formulas but I am not getting the correct values.

For example if the CMYK values are 67,82,0,0 then the corresponding RGB values are 125,45,210 and vice versa.

Can anyone help me to get the correct values? Is there any formula which will give the correct values.

Thanks in advance.

Views

213.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 22, 2010 Apr 22, 2010

Copy link to clipboard

Copied

This was discussed just in the past week. There is no single "correct" set of conversions, it depends on the profiles you are using for source and destination. I doubt that any "simple" formula is going to be able to provide good numbers through an entire range due to differnces in gamut, and what needs to move, and how much, will be controlled by the rendering intent.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 22, 2010 Apr 22, 2010

Copy link to clipboard

Copied

Peter is right. Color conversions are extremely complex. What's more, Lab is always in between. When you go RGB > CMYK, it's really RGB > Lab > CMYK.

RGB numbers alone do not make colors. CMYK numbers alone do not make colors. It is only when the numbers are associated with a precise color space that they take on a color definition. This definition is achieved by means of a translation into the Lab color space, which is device independent.

If you need specific colors, the focus is generally on appearance. If you adhere to good color management policies then device numbers (RGB, CMYK) don't matter so much.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2010 Apr 23, 2010

Copy link to clipboard

Copied

Here is the link to the discussion Peter mentioned

http://forums.adobe.com/message/2747248#2747248

Rick's right there's no way an algorithm as simplistic as the one in the post would get you a meaningful conversion. Maybe you could tell us exactly what you are trying to do. I think you will need to find a way to leverage ID's color managed conversions and store the conversion results in a variable somewhere.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 05, 2015 Oct 05, 2015

Copy link to clipboard

Copied

LATEST

Numbers dont mean anything unless tagged with a color profile.

Be it RGB or CMYK. the very idea of converting a color value from one to another using a formula is wrong.

It assumes all colors are are in the same gamut and merely represented with different modes (CMYK, RGB), which is not the case.

The scales (values in RGB or CMYK) must belong to some "color space (profile)". The values then mean some "real' color (assume LAB for simplicity). Converting from RGB to CMYK mean to first understand what color (in LAB) is represented in RGB and finding values (nearby or acap) to colors represented in CMYK in the target color space.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines