Allows a user to convert among the color models rgb, hsv, hls, and yiq.
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.
#include <ncarg/ncargC.h>
c_hlsrgb
c_hsvrgb
c_rgbhls
c_rgbhsv
c_rgbyiq
c_yiqrgb
To use Colconv or c_colconv routines, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
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:
Lightness is less than 0. or greater than 100.
Saturation is less than 0. or greater than 100.
Saturation is less than 0. or greater than 1.
Value of input color is less than 0. or greater than 1.
Value of red intensity component is less than 0. or greater than 1.
Value of green intensity component is less than 0. or greater than 1.
Value of blue intensity component is less than 0. or greater than 1.
Value of red intensity component is less than 0. or greater than 1.
Value of green intensity component is less than 0. or greater than 1.
Value of blue intensity component is less than 0. or greater than 1.
Online: hlsrgb, hsvrgb, rgbhls, rgbhsv, rgbyiq, yiqrgb, ncarg_cbind.
Hardcopy: NCAR Graphics Fundamentals, UNIX Version
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.