home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!howland.reston.ans.net!usc!cs.utexas.edu!torn!nott!emr1!jagrant
- From: jagrant@emr1.emr.ca (John Grant)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: how to convert (C,M,Y) colours to (R,G,B)?
- Message-ID: <1993Jan12.232630.7796@emr1.emr.ca>
- Date: 12 Jan 93 23:26:30 GMT
- References: <1993Jan7.211624.27277@emr1.emr.ca> <1993Jan11.221759.7441@sierra.com>
- Organization: Energy, Mines, and Resources, Ottawa
- Lines: 30
-
- In article <1993Jan11.221759.7441@sierra.com> paul@sierra.com (Paul Stratton) writes:
- >In article <1993Jan7.211624.27277@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
- [stuff deleted]
- >
- >It really is simple. For example if your CMY is in the range of 0 - 255
- >and you have a CMY value of (4, 195, 80) then the RGB value is
- >
- > 255 - 4
- > 255 - 195
- > 255 - 80
- >
- >The only problem is I can't remember which CMY go with which RGB! I haven't
- >done this in a while.
- Yeah, I found it already:
- R=1-C
- G=1-M
- B=1-Y
- assuming that all of r,g,b,c,m,y are [0,1] range.
- or:
- R=255-C
- G=255-M
- B=255-Y
- assuming all are [0,255]. This makes sense since
- (c,m,y)=(0,0,0) is white (i.e. no paint on paper) and white
- is also (r,g,b)=(255,255,255), i.e. all guns turned on,
- summing to white.
- --
- John A. Grant jagrant@emr1.emr.ca
- Airborne Geophysics
- Geological Survey of Canada, Ottawa
-