>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  RGB2C
Libraries

RGB2C

RGB2C

Name


      RGB2C

Purpose


      Convert R,G,B (or H,S,V) values to 24-bit color.

Category


Calling Sequence


      c = rgb2c(r,g,b)

Inputs


      r,g,b = Red, Green, Blue color components. in

Keyword Parameters


Keywords


        /HSV Input h,s,v instead of r,g,b.

Outputs


      c = Returned 24-bit color value(s). out

Common Blocks


Notes


      Note: r,g,b values are from 0 to 255.
            h,s,v values are: h=0 to 360, s=0 to 1, v=0 to 1.
      Inputs may be arrays. If arrays are given then the
      number of elements must match. If arrays and scalars
      are mixed then scalars will be converted to arrays with
      the correct number of elements.
     
      Inverse of c2rgb and c2hsv.

Modification History


      R. Sterner, 2005 Oct 05
  Copyright (C) 2005, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us