home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4885 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.6 KB

  1. Path: sparky!uunet!nwnexus!ole!rwing!fnx!sgihbtn!paul
  2. From: paul@sierra.com (Paul Stratton)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: how to convert (C,M,Y) colours to (R,G,B)?
  5. Message-ID: <1993Jan11.221759.7441@sierra.com>
  6. Date: 11 Jan 93 22:17:59 GMT
  7. References: <1993Jan7.211624.27277@emr1.emr.ca>
  8. Sender: news@sierra.com
  9. Organization: Sierra Geophysics Inc.,  Kirkland, Wa
  10. Lines: 28
  11. Nntp-Posting-Host: fuji
  12.  
  13. In article <1993Jan7.211624.27277@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
  14. >I have several (C,M,Y) colour palettes that we use in UNIRAS graphics
  15. >on the VAX that I want to convert to (R,G,B) palettes for use in Windows.
  16. >Can anyone supply the algorithms to convert between these 2 colour
  17. >systems.  I have code to convert between (H,L,S) and (R,G,B).
  18. >I think the relationship between CMY and RGB is quite simple, because
  19. >CMY is subtractive and RGB is additive.
  20. >-- 
  21. >John A. Grant                        jagrant@emr1.emr.ca
  22. >Airborne Geophysics
  23. >Geological Survey of Canada, Ottawa
  24.  
  25. It really is simple.  For example if your CMY is in the range of 0 - 255
  26. and you have a CMY value of (4, 195, 80) then the RGB value is
  27.  
  28.     255 - 4
  29.     255 - 195
  30.     255 - 80
  31.  
  32. The only problem is I can't remember which CMY go with which RGB!  I haven't
  33. done this in a while.
  34.  
  35.  
  36. -- 
  37. Paul Stratton               -----   -----   -----    -----    -----    ------
  38. Sierra Geophysics, Inc.    /          /    /        /    /   /    /   /     /
  39. P.O. Box 3886              -----     /    /---     /-----   /-----   /-----/
  40. Seattle, Wa.  98124            /    /    /        /   \    /  \     /     /
  41.