GQCR(3NCARG)

✨ GQCR (Inquire color representation) ✨

okay bestie so this is GQCR, a little routine from the NCAR Graphics family (section 3NCARG, if you're keeping score) πŸ’… and what it does is... it goes and asks a workstation "hey, what color is this index actually giving me?" β€” it retrieves the color value associated with a color index on a particular workstation. no cap. πŸŽ€


🌸 SYNOPSIS 🌸

CALL GQCR (WKID, CI, TYPE, ERRIND, CR, CG, CB)

πŸ¦‹ C-BINDING SYNOPSIS πŸ¦‹

#include <ncarg/gks.h>

void ginq_colr_rep(Gint ws_id, Gint colr_ind, Ginq_type type, Gint
*err_ind, Gcolr_rep  *colr_rep);

πŸ’– DESCRIPTION πŸ’–

okay so here's the whole cast, one by one, and I need you to actually read this part because it's giving important:

  • WKID (Integer, Input) β€” the workstation identifier, and it's gotta be the same one you set in a previous call to GOPWK. like, the workstation you already introduced yourself to. 🀝
  • CI (Integer, Input) β€” a color index. that's it. that's the whole job. the index you're curious about. 🎨
  • TYPE (Integer, Input) β€” this one's the main character fr, because it picks which color values come back to you: the ones that were specified by a call to GSCR, or the ones that are actually being used on the specified workstation. and yes, those can differ, because frequently a workstation will not be able to represent a requested color value precisely. πŸ’€ it's doing its best, okay?
    • 0 β€” returns the color value set for index CI either by default or by a call to GSCR.
    • 1 β€” returns the color value actually used by the workstation to represent the requested color.
  • ERRIND (Integer, Output) β€” if the inquired values can't be returned correctly, a non-zero error indicator comes back in ERRIND. otherwise you get a zero. 🫢 and if you want the tea on what each error indicator actually means, go consult "User's Guide for NCAR GKS-0A Graphics".
  • CR (Real, Output) β€” returns an intensity value for red, in the range 0. to 1. inclusive. πŸ“
  • CG (Real, Output) β€” returns an intensity value for green, in the range 0. to 1. inclusive. 🧚
  • CB (Real, Output) β€” returns an intensity value for blue, in the range 0. to 1. inclusive. πŸ¦‹

🌈 USAGE 🌈

for all the details on setting and using color indices, go read the man page for GSCR. that's where the lore lives. iykyk. ✨


πŸ‘‘ ACCESS πŸ‘‘

to use GKS routines, load the NCAR GKS-0A library ncarg_gks. that's the vibe check you gotta pass. πŸ’…


πŸ’œ SEE ALSO πŸ’œ

Online: gscr, gsplci, gsmkci, gstxci, gsfaci, ginq_colr_rep

Hardcopy: User's Guide for NCAR GKS-0A Graphics; 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.


and that's the whole page bestie, we ate and left no crumbs 🫢

this was GQCR(3NCARG) from the NCAR GRAPHICS manual, UNIX, dated March 1993 β€” iconic behavior honestly, periodt. πŸ’–βœ¨