GINQ_COLR_REP(3NCARG)

πŸ’… GINQ_COLR_REP(3NCARG) β€” NCAR GRAPHICS πŸ’…

okay bestie, so this one lives in the NCAR GRAPHICS manual, and its whole thing is: inquiring about GKS color representations. literally its entire job. it's giving "let me check what that color index is actually wearing today" πŸ’–


✨ NAME ✨

ginq_colr_rep β€” Inquire GKS color representation 🎨


🌸 DESCRIPTION 🌸

ginq_colr_rep (Inquire color representation) β€” bestie, this one retrieves the color value that's associated with a color index on one particular workstation. that's it, that's the vibe. you hand it an index, it hands you back the color. iconic behavior honestly 🫢


πŸ¦‹ 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);

like. look at her. five arguments and a dream ✨


πŸ’œ DESCRIPTION πŸ’œ

okay so let's break down every single one of these, no skipping, we're doing this properly:

  • ws_id (Input) β€” the workstation identifier, and it has to be the same one you set in a previous call to gopen_ws. no making up new ones, she will notice πŸ’€
  • colr_ind (Input) β€” a color index. that's the thing you're asking about.
  • type (Input) β€” this one decides which flavor of color value comes back: is it the value that got specified by a call to gset_colr_rep, or is it the value that the workstation is actually using? and bestie, lowkey important: a workstation frequently will not be able to represent a requested color value precisely. so those two things can genuinely be different. rude, but true 😭
    • GINQ_SET Returns the color value that was set for index colr_ind, either by default or by a call to gset_colr_rep. the intended look. the vision board πŸ’…
    • GINQ_REALIZED Returns the color value that the workstation actually uses to represent the requested color. the real-world result. the "we did our best with the hardware we have" version 🫠
  • err_ind (Output) β€” if the inquired values can't be returned correctly, you get a non-zero error indicator in err_ind. otherwise you get a zero, and everything is slay. and for what those error indicators even mean, go consult "User's Guide for NCAR GKS-0A Graphics" β€” that's the receipts, I don't make the rules πŸ“–
  • colr_rep.rgb.red (Gfloat, Output) β€” returns an intensity value for red, in the range 0. to 1. inclusive. ❀️
  • colr_rep.rgb.green (Gfloat, Output) β€” returns an intensity value for green, in the range 0. to 1. inclusive. πŸ’š
  • colr_rep.rgb.blue (Gfloat, Output) β€” returns an intensity value for blue, in the range 0. to 1. inclusive. πŸ’™

so yeah. three floats, all between 0. and 1. inclusive, one per channel. RGB girlies rise 🌈


πŸŽ€ USAGE πŸŽ€

want the full tea on setting and using color indices? go read the man page for gset_colr_rep. that's where the lore lives ✨


πŸ‘‘ ACCESS πŸ‘‘

to use the GKS C-binding routines, you gotta load the ncarg_gks and ncarg_c libraries. both. not one. both, bestie 🫢


🌈 SEE ALSO 🌈

Online:

  • gset_colr_rep(3NCARG)
  • gset_line_colr_ind(3NCARG)
  • gset_marker_size(3NCARG)
  • gset_text_colr_ind(3NCARG)
  • gset_fill_colr_ind(3NCARG)
  • gks(3NCARG)
  • ncarg_gks_cbind(3NCARG)

Hardcopy:

  • User's Guide for NCAR GKS-0A Graphics
  • NCAR Graphics Fundamentals, UNIX Version

the whole friend group, honestly. go say hi πŸ’–


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.

okay so legally I have to be normal for one second: the use of this software is governed by a License Agreement. that's not a vibe, that's a fact. respect it πŸ’…

and that's the whole page, bestie!! this one came from the UNIX manual, dated March 1993, and it answers to the name GINQ_COLR_REP(3NCARG). go forth and inquire about colors responsibly πŸŽ€βœ¨πŸ’–