YIQRGB(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

✨ NAME ✨

ok so bestie, welcome to YIQRGB from the NCAR GRAPHICS manual (section 3NCARG, if you're keeping track πŸ’…) β€” this one is a color converter and she's lowkey iconic.

YIQRGB converts a color specification given in the YIQ color space to the equivalent color specification in the Red, Green, Blue (RGB) color space. that's it, that's the whole job, and she does it flawlessly. periodt. πŸ’–


🌸 SYNOPSIS 🌸

CALL YIQRGB (Y, I, Q, R, G, B)

πŸ’« C-BINDING SYNOPSIS πŸ’«

#include <ncarg/ncargC.h>

void c_yiqrgb (float y, float i, float q, float *r,
float *g, float *b)

πŸŽ€ DESCRIPTION πŸŽ€

ok so here are the six arguments, and yes you gotta know all of them, no skipping 🫢

  • Y (REAL, input, range [0.,1.]) β€” specifies the color component of a television signal that is shown on black-and-white televisions. the way that Y minimizes the effect of two colors appearing different to the human eye but mapping to similar monochrome intensities?? obsessed. it's giving "i look different but i hit the same on a grayscale TV" energy. πŸ‘‘
  • I (REAL, input, range [-.6,.6]) β€” one of the two chrominance-ish inputs, bestie. that's the range, respect the range. 🌸
  • Q (REAL, input, range [-.52,.52]) β€” the other input, and yes the range is different from I's, don't get it twisted. πŸ’…
  • R (REAL, output, range [0.,1.]) β€” represents the red intensity component of the output color in RGB color space. she's giving output energy, so don't expect her to have a value going in. πŸ“
  • G (REAL, output, range [0.,1.]) β€” represents the green intensity component of the output color in RGB color space. ✨
  • B (REAL, output, range [0.,1.]) β€” represents the blue intensity component of the output color in RGB color space. πŸ¦‹

πŸ’œ C-BINDING DESCRIPTION πŸ’œ

ngl, the C-binding argument descriptions are the same as the FORTRAN argument descriptions. like, literally identical. same y, i, q coming in, same *r, *g, *b pointers coming out. no cap. 😌


🌈 EXAMPLES 🌈

want to actually see this in action? use the ncargex command to see the following relevant examples: tcolcv, fcce02. go look, they ate. πŸ”₯


πŸ”₯ ACCESS πŸ”₯

to use YIQRGB or c_yiqrgb, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. the order matters bestie, don't be chaotic about it. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

Online: colconv, hlsrgb, hsvrgb, rgbhls, rgbhsv, rgbyiq, 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.

ok that's the whole page, mwah πŸ’‹ this was YIQRGB(3NCARG) from the NCAR Graphics manual, and the version deets at the bottom say UNIX, dated March 1993 β€” yeah she's vintage but she still slays. bye bestie, go convert some colors πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from