Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Newsgroups: comp.graphics Subject: Re: RGB-=>CMYK Message-ID: <1990Jun3.231332.1551@druid.uucp> Date: 3 Jun 90 23:13:32 GMT References: <2967@crash.cts.com> Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain) Organization: D'Arcy Cain Consulting, West Hill, Ontario Lines: 29 In article <2967@crash.cts.com> jandreas@pro-graphics.cts.com (Jason Andreas) writes: >I'm in need of some software (specifically source code) for RGB-=>CMYK >conversion. If someone could post a phone number or FTP site where such a >thing is available, please do so. > Perhaps this should be added to the FAQ. This depends on how you store colour information but assuming each of the RGB and CMYK components is an integer from 0 to 255 then you have to do the following: Convert to CMY C = 255 - R M = 255 - G Y = 255 - B Find the black level. This is simply the smallest of C, M or Y. Subtract this value from each of C, M and Y. Note that this means that even with black included, there is never more than 3 components for a colour. There are further enhancements which involve adjusting for each of the inks but this varies with different printing processes. -- D'Arcy J.M. Cain (darcy@druid) | Government: D'Arcy Cain Consulting | Organized crime with an attitude West Hill, Ontario, Canada | (416) 281-6094 |