home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xcolored.zip / xcoloredit / color.h < prev    next >
C/C++ Source or Header  |  1991-06-18  |  982b  |  52 lines

  1. /* $Header: /usr/nfs/maple/d0/users/rlh2/toolkit/installed-src/xcoloredit/RCS/color.h,v 1.2 90/06/30 14:33:12 rlh2 Rel Locker: rlh2 $ */
  2.  
  3. /* 
  4.  * color.h - color definitions
  5.  * 
  6.  * Author:    Christopher A. Kent
  7.  *         Western Research Laboratory
  8.  *         Digital Equipment Corporation
  9.  * Date:    Sun Dec 13 1987
  10.  * Copyright (c) 1987 Christopher A. Kent
  11.  */
  12.  
  13. /*
  14.  * $Log:    color.h,v $
  15.  * Revision 1.2  90/06/30  14:33:12  rlh2
  16.  * patchlevel 1
  17.  * 
  18.  * Revision 1.1  90/05/10  11:16:54  rlh2
  19.  * Initial revision
  20.  * 
  21.  * Revision 1.2  88/06/30  09:58:56  mikey
  22.  * Handles CMY also.
  23.  * 
  24.  * Revision 1.1  88/06/30  09:10:53  mikey
  25.  * Initial revision
  26.  * 
  27.  */
  28.  
  29. typedef    struct _RGB {
  30.     unsigned short r, g, b;
  31. } RGB;
  32.  
  33. typedef    struct _HSV {
  34.     float    h, s, v;    /* [0, 1] */
  35. } HSV;
  36.  
  37. typedef struct _CMY {
  38.     unsigned short c, m, y;
  39. } CMY;
  40.  
  41. extern RGB    RGBWhite, RGBBlack;
  42.  
  43. RGB    MixRGB();
  44. RGB    MixHSV();
  45. RGB    HSVToRGB();
  46. HSV    RGBToHSV();
  47. float    RGBDist();
  48. RGB    PctToRGB();
  49. HSV    PctToHSV();
  50. RGB    CMYToRGB();
  51. CMY    RGBToCMY();
  52.