%N grxhls %F $MIR/src/grxhls.f
%D Convert RGB color to HLS color
%B
      SUBROUTINE GRXHLS (R,G,B,H,L,S)

 GRPCKG: Convert a color specified in the RGB color model to one in
 the HLS model.  This is a support routine: no graphics I/O occurs.
 The inverse transformation is accomplished with routine GRXRGB.
 Reference: SIGGRAPH Status Report of the Graphic Standards Planning
 Committee, Computer Graphics, Vol.13, No.3, Association for
 Computing Machinery, New York, NY, 1979.

 Arguments:

 R,G,B (real, input): red, green, blue color coordinates, each in the
       range 0.0 to 1.0. Input outside this range causes HLS = (0,1,0)
       [white] to be returned.
 H,L,S (real, output): hue (0 to 360), lightness (0 to 1.0), and
       saturation (0 to 1.0).
