HLSRGB(3NCARG)
β¨ HLSRGB β it's giving color conversion, bestie β¨
okay so real talk, this is a page from the NCAR GRAPHICS manual, section 3NCARG, and it's about a little routine called HLSRGB π
π NAME π
HLSRGB β converts a color specification given as Hue, Lightness, and Saturation (HLS) values to Red, Green, and Blue (RGB) intensity values. it's literally the glow-up pipeline for your colors, no cap π
πΈ SYNOPSIS πΈ
CALL HLSRGB ( H, L, S, R, G, B )
that's it. that's the whole vibe. six little args and you're done π
π¦ C-BINDING SYNOPSIS π¦
for my C girlies (iykyk):
#include <ncarg/ncargC.h>
void c_hlsrgb (float h, float l, float s, float *r,
float *g, float *b)
β¨ DESCRIPTION β¨
so here's the tea on every single argument, and yes i'm giving you all of them because you deserve the full picture π«Ά
Hβ (REAL, input, range[0.,360.)) this is the hue of your input color in HLS color space. and listen,H=0.corresponds to blue. not red, not pink, blue. iconic of it honestly πLβ (REAL, input, range[0.,100.]) the lightness value of your input color in HLS color space. lightness is a measure of the quantity of light β a lightness of0.is black, and a lightness of100.gives white. the pure hues occur at lightness value50. so 50 is the main character here, periodt β¨Sβ (REAL, input, range[0.,100.]) the saturation value of your input color in HLS color space. saturation is a measure of how much white light is mixed with the color. colors having a saturation value of0.represent grays with a gray intensity value equal to the lightnessL. colors with a saturation value of100.are fully saturated colors. also important: the hue is undefined whenS=0.π so don't come for H when there's no S. the fully saturated pure hues occur whenS=100.andL=50.Rβ (REAL, output, range[0.,1.]) the red intensity component of the output color in RGB color space π₯Gβ (REAL, output, range[0.,1.]) the green intensity component of the output color in RGB color space πΏBβ (REAL, output, range[0.,1.]) the blue intensity component of the output color in RGB color space π
π C-BINDING DESCRIPTION π
good news bestie, nothing new to memorize here β the C-binding argument descriptions are the same as the FORTRAN argument descriptions. same facts, different syntax, we love a consistent queen π
π EXAMPLES π
want to see this in the wild? use the ncargex command to see the following relevant examples: ccpcldm, ccplbam, ccpllb, ccplll, ccpllw, colcon, fcce02. go look, it's giving research era π
π ACCESS π
to use HLSRGB or c_hlsrgb, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. order matters, don't be chaotic about it π
π MESSAGES π
see the colconv man page for a description of all Colconv error messages and/or informational messages. yes, there's a whole other page for the drama, go read it π«Ά
β SEE ALSO β
Online: colconv, 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.
ok that's the whole page, go convert some colors, you absolute legend πΈ
mwah π this was the UNIX release from March 1993, HLSRGB(3NCARG), signing off β stay saturated, stay iconic β¨
π¦ 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