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