1RGBHLS(3NCARG)                   NCAR GRAPHICS                  RGBHLS(3NCARG)
2
3
4

NAME

6       RGBHLS - Converts a color specification given in the Red, Green, Blue
7       (RGB) color space to color values in the Hue, Lightness, Saturation
8       (HLS) color space.
9

SYNOPSIS

11       CALL RGBHLS (R, G, B, H, L, S)
12

C-BINDING SYNOPSIS

14       #include <ncarg/ncargC.h>
15
16       void c_rgbhls (float r, float g, float b, float *h,
17       float *l, float *s)
18

DESCRIPTION

20       R           (REAL, input, range [0.,1.])  represents the red intensity
21                   component of the input point in RGB color space.
22
23       G           (REAL, input, range [0.,1.])  represents the green
24                   intensity component of the input point in RGB color space.
25
26       B           (REAL, input, range [0.,1.])  represents the blue intensity
27                   component of the input point in RGB color space.
28
29       H           (REAL, output, range [0.,360.) ) represents the hue of the
30                   input point in HLS color space. A value of (0.,0.,B) in the
31                   input space will result in a hue of 0. in the output space.
32
33       L           (REAL, output, range [0.,100.])  represents the lightness
34                   value of the input point in HLS color space.  Lightness is
35                   a measure of the quantity of light - a lightness of 0. is
36                   black, and a lightness of 100.  gives white. The pure hues
37                   occur at lightness value 50.
38
39       S           (REAL, output, range [0.,100.])  represents the saturation
40                   value of the input point in HLS color space.  Saturation is
41                   a measure of how much white light is mixed with the color.
42                   Saturation values of 0.  represent grays (with a gray value
43                   equal to the lightness value L). Saturation values of 100.
44                   are fully saturated colors. The hue is undefined when S=0.
45                   The fully saturated pure hues occur when S=100. and L=50.
46                   The saturation value should be thought of as a percentage.
47

EXAMPLES

49       Use the ncargex command to see the following relevant examples: tcolcv,
50       fcce02.
51

C-BINDING DESCRIPTION

53       The C-binding argument descriptions are the same as the FORTRAN
54       argument descriptions.
55

ACCESS

57       To use RGBHLS or c_rgbhls, load the NCAR Graphics libraries ncarg,
58       ncarg_gks, and ncarg_c, preferably in that order.
59

MESSAGES

61       See the colconv man page for a description of all Colconv error
62       messages and/or informational messages.
63

SEE ALSO

65       Online: colconv, hlsrgb, hsvrgb, rgbhsv, rgbyiq, yiqrgb, ncarg_cbind.
66
67       Hardcopy: NCAR Graphics Fundamentals, UNIX Version
68
70       Copyright (C) 1987-2007
71       University Corporation for Atmospheric Research
72
73       This documentation is free software; you can redistribute it and/or
74       modify it under the terms of the GNU General Public License as
75       published by the Free Software Foundation; either version 2 of the
76       License, or (at your option) any later version.
77
78       This software is distributed in the hope that it will be useful, but
79       WITHOUT ANY WARRANTY; without even the implied warranty of
80       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
81       General Public License for more details.
82
83       You should have received a copy of the GNU General Public License along
84       with this software; if not, write to the Free Software Foundation,
85       Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
86
87
88
89UNIX                              March 1993                    RGBHLS(3NCARG)
Impressum