home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!nwnexus!ole!rwing!fnx!sgihbtn!paul
- From: paul@sierra.com (Paul Stratton)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: how to convert (C,M,Y) colours to (R,G,B)?
- Message-ID: <1993Jan11.221759.7441@sierra.com>
- Date: 11 Jan 93 22:17:59 GMT
- References: <1993Jan7.211624.27277@emr1.emr.ca>
- Sender: news@sierra.com
- Organization: Sierra Geophysics Inc., Kirkland, Wa
- Lines: 28
- Nntp-Posting-Host: fuji
-
- In article <1993Jan7.211624.27277@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
- >I have several (C,M,Y) colour palettes that we use in UNIRAS graphics
- >on the VAX that I want to convert to (R,G,B) palettes for use in Windows.
- >Can anyone supply the algorithms to convert between these 2 colour
- >systems. I have code to convert between (H,L,S) and (R,G,B).
- >I think the relationship between CMY and RGB is quite simple, because
- >CMY is subtractive and RGB is additive.
- >--
- >John A. Grant jagrant@emr1.emr.ca
- >Airborne Geophysics
- >Geological Survey of Canada, Ottawa
-
- 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.
-
-
- --
- Paul Stratton ----- ----- ----- ----- ----- ------
- Sierra Geophysics, Inc. / / / / / / / / /
- P.O. Box 3886 ----- / /--- /----- /----- /-----/
- Seattle, Wa. 98124 / / / / \ / \ / /
-