RGBHSV(3NCARG)
π RGBHSV β the NCAR Graphics glow-up page π
okay bestie, welcome to the NCAR GRAPHICS manual, 3NCARG edition, and today we're doing color math π
β¨ NAME β¨
RGBHSV β converts a color spec that's living in the Red, Green, Blue (RGB) color space into color values over in the Hue, Saturation, and Value (HSV) color space. it's giving translator, it's giving bilingual icon π
π«Ά SYNOPSIS π«Ά
CALL RGBHSV (R, G, B, H, S, V)
π C-BINDING SYNOPSIS π
#include <ncarg/ncargC.h>
void c_rgbhsv (float r, float g, float b, float *h,
float *s, float *v)
πΈ DESCRIPTION πΈ
so here's the whole cast, no skips, everyone matters:
Rβ (REAL, input, range[0.,1.]) this is the red intensity component of your input point, in RGB color space. π΄Gβ (REAL, input, range[0.,1.]) the green intensity component of the input point in RGB color space. πBβ (REAL, input, range[0.,1.]) the blue intensity component of the input point in RGB color space. πHβ (REAL, output, range[0.,360.)) the hue of the input point in HSV color space. heads up: a value of(R,0.,0.)in the input space will give you a hue of0.in the output space. so pure red walks in, hue-zero walks out, that's the deal π₯Sβ (REAL, output, range[0.,1.]) the saturation value of the input point in HSV color space. saturation is literally a measure of how much white light is mixed into the color, iykyk.- saturation values of
0.represent grays β and the gray value equalsV. - saturation values of
1.are fully saturated colors. - the hue is technically undefined when
S=0.β the code leavesHat its previous value whenS=0.(0.initially). not me warning you about the undefined hue π - the fully saturated pure hues occur when
S=1.andV=1.π
- saturation values of
Vβ (REAL, output, range[0.,1.]) the value in HSV space. that's it, that's the vibe check π
π C-BINDING DESCRIPTION π
the C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different language, no cap π«Ά
β EXAMPLES β
use the ncargex command to see these relevant examples: tcolcv, fcce02. go look, they ate π
π¦ ACCESS π¦
to use RGBHSV or c_rgbhsv, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β preferably in that order. order matters bestie, don't be chaotic π
π MESSAGES π
see the colconv man page for a description of all Colconv error messages and/or informational messages. everything's documented over there, periodt β¨
π SEE ALSO π
Online: colconv, hlsrgb, hsvrgb, rgbhls, 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.
and that's the whole page, bestie! source and version: this is the UNIX flavor of the manual, dated March 1993, filed under RGBHSV(3NCARG). iconic, historic, lowkey timeless πβ¨π
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms