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 πŸ“Ί. Y is 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 (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 πŸŽ€πŸ¦‹