Colconv(3NCARG)

NAME
Colconv - Allows a user to convert among the color models RGB, HSV, HLS, and YIQ.

SYNOPSIS
HLSRGB - Converts a color specification given as Hue, Lightness, and Saturation (HLS) values to Red, Green, and Blue (RGB) intensity values in the RGB color space.

HSVRGB - Converts a color specification given in the Hue, Saturation, and Value (HSV) color space to color values in the Red, Green, Blue (RGB) color space.

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

RGBHSV - Converts a color specification given in the Red, Green, Blue (RGB) color space to color values in the Hue, Saturation, and Value (HSV) color space.

RGBYIQ - Converts a color specification given in the RGB Red, Green, Blue, (RGB) color space to a color specification in the YIQ color space.

YIQRGB - Converts a color specification given in the YIQ color space to the equivalent color specification in the Red, Green, Blue (RGB) color space.

C-BINDING SYNOPSIS
#include <ncarg/ncargC.h>

c_hlsrgb
c_hsvrgb
c_rgbhls
c_rgbhsv
c_rgbyiq
c_yiqrgb

ACCESS
To use Colconv or c_colconv routines, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.

MESSAGES
When error conditions are detected, the support routine SETER is called in such a way that it writes a message to the standard error file (as defined by I1MACH(4)) and then terminates execution. The possible error messages are as follows:

HLSRGB - L out of range
    Lightness is less than 0. or greater than 100.

HLSRGB - S out of range
    Saturation is less than 0. or greater than 100.

HSVRGB - S out of range
    Saturation is less than 0. or greater than 1.

HSVRGB - V out of range
    Value of input color is less than 0. or greater than 1.

RGBHLS - R out of range
    Value of red intensity component is less than 0. or greater than 1.

RGBHLS - G out of range
    Value of green intensity component is less than 0. or greater than 1.

RGBHLS - B out of range
    Value of blue intensity component is less than 0. or greater than 1.

RGBHSV - R out of range
    Value of red intensity component is less than 0. or greater than 1.

RGBHSV - G out of range
    Value of green intensity component is less than 0. or greater than 1.

RGBHSV - B out of range
    Value of blue intensity component is less than 0. or greater than 1.

SEE ALSO
Online: hlsrgb, hsvrgb, rgbhls, rgbhsv, rgbyiq, yiqrgb, ncarg_cbind.

Hardcopy: NCAR Graphics Fundamentals, UNIX Version

COPYRIGHT
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.