RGBYIQ(3NCARG)
RGBYIQ(3NCARG) π
okay bestie, so this is a page from the NCAR GRAPHICS manual set β it lives in section 3NCARG and its whole job is a glow-up for your color math. sit down, we're converting colors π
β¨ NAME β¨
RGBYIQ β literally takes a color spec written in the RGB (Red, Green, Blue) color space and converts it into a color spec in the YIQ color space. no cap. that's it. that's the whole job. π
β¨ SYNOPSIS β¨
CALL RGBYIQ (R, G, B, Y, I, Q)
β¨ C-BINDING SYNOPSIS β¨
for my C girlies π«Ά
#include <ncarg/ncargC.h>
void c_rgbyiq (float r, float g, float b, float *y,
float *i, float *q)
β¨ DESCRIPTION β¨
okay so here's the cast of characters, and each one has β¨loreβ¨:
Rβ (REAL, input, range[0.,1.]) the red intensity component of the input point in RGB color space. it's giving red. obviously.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.Yβ (REAL, output, range[0.,1.]) this is THE color component of a television signal β the one that gets shown on black-and-white televisions πΊ.Yis the overachiever that minimizes the effect of two colors appearing different to the human eye but mapping to similar monochrome intensities. she keeps things consistent fr fr.Iβ (REAL, output, range[-.6,.6]) this one hits its maximum when the input triple is(1.,0.,0.), and hits its minimum when the input triple is(0.,1.,1.). main character with a very specific range πQβ (REAL, output, range[-.52,.52]) this one hits its maximum when the input triple is(1.,0.,1.), and hits its minimum when the input triple is(0.,1.,0.). so dramatic, love that for her.
β¨ C-BINDING DESCRIPTION β¨
the C-binding argument descriptions are the exact same as the FORTRAN argument descriptions. same vibes, different syntax. iykyk π
β¨ EXAMPLES β¨
use the ncargex command to see the following relevant examples: tcolcv, fcce02. go look at them, they ate π₯
β¨ ACCESS β¨
to use RGBYIQ or c_rgbyiq, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β preferably in that order. yes the order matters, don't be chaotic about it π
β¨ SEE ALSO β¨
Online: colconv, hlsrgb, hsvrgb, rgbhls, rgbhsv, 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.
π that's the whole page, bestie! go forth and convert your colors π
this cutie dropped way back in March 1993, source/version vibes straight from UNIX, and yeah β the page tag is RGBYIQ(3NCARG). slay ππ¦
π¦ 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