home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19652 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.8 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!agate!ucbvax!lrw.com!leichter
  2. From: leichter@lrw.com (Jerry Leichter)
  3. Newsgroups: comp.os.vms
  4. Subject: re:
  5. Message-ID: <9212211420.AA16803@uu3.psi.com>
  6. Date: 21 Dec 92 13:08:09 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 27
  10.  
  11.  
  12.     I've been working (playing) on the side with sixel graphics for a few
  13.     years.  I've written Display <--> sixel programs for the IBM PC, and a
  14.     graphics format conversion program in pascal for the VAX.  Now, I've
  15.     stumbled onto a question that's been haunting me for quite some time.
  16.     It comes up because my program on the VAX stores colors in HLS form.
  17.     If a sixel has the colors defined using RGB values, I'd like to
  18.     convert them to the matching HLS values.  The Hue is no problem.  But,
  19.     Light and Saturation are still evading me.  Light, according the table
  20.     of HLS and RGB values for the standard colors in volume 2 of the VT340
  21.     programmers reference, is not just a simple average of Red Green and
  22.     Blue, I tried that already.  It does say that, for monochrome
  23.     monitors, that Light = (2G+R)/3, but this is apparently not the case
  24.     for color monitors.
  25.  
  26.     I've checked in the Enc. Britannica, and two other color science
  27.     books, but they're mostly concerned with the CIE standards for
  28.     measuring light, not the application end.  I would have checked the
  29.     Regis manual, but I can not find it at our site.
  30.  
  31. Try Foley and Van Dam's "Fundamentals of Computer Graphics".  (There's a newer
  32. version called "Computer Graphics:  Principles and Practice" with two more
  33. authors which probably has the same information.)  It gives small programs for
  34. transformations among all the color models.  I started typing in a simplified
  35. version of the transformation, but even that is too long to be worth doing.
  36.  
  37.                             -- Jerry
  38.