TDCLRS(3NCARG)
β¨ TDCLRS β¨
okay bestie, welcome to TDCLRS from the NCAR Graphics crew (that's the 3NCARG manual, if you were wondering) π this little icon does GKS calls to define colors for TDPACK. yes, the TDPACK. we're color-coordinating, we're slaying, we're making surfaces look cute. periodt.
π SYNOPSIS
CALL TDCLRS (IWID, IBOW, SHDE, SHDR, IOFC, IOLC, ILMT)
π C-BINDING SYNOPSIS
#include <ncarg/ncargC.h>
void c_tdclrs(int iwid, int ibow, float shde, float shdr, int iofc, int
iolc, int ilmt)
π DESCRIPTION
so this routine gets called to do the GKS calls that define the following colors on a specified workstation. heads up: NSHD is equal to IOLC-IOFC+1, aka the number of elements in each block of color shades. write that down π
- Color 0 = background color (depends on IBOW)
- Color 1 = foreground color (depends on IBOW)
- Color 2 = red (RGB values 1,0,0)
- Color 3 = green (RGB values 0,1,0)
- Color 4 = blue (RGB values 0,0,1)
- Color 5 = cyan (RGB values 0,1,1)
- Color 6 = magenta (RGB values 1,0,1)
- Color 7 = yellow (RGB values 1,1,0)
- Colors IOFC - IOLC = grays, white to black
- Colors IOFC+NSHD - IOLC+NSHD = grays
- Colors IOFC+2*NSHD - IOLC+2*NSHD = reds
- Colors IOFC+3*NSHD - IOLC+3*NSHD = greens
- Colors IOFC+4*NSHD - IOLC+4*NSHD = blues
- Colors IOFC+5*NSHD - IOLC+5*NSHD = cyans
- Colors IOFC+6*NSHD - IOLC+6*NSHD = magentas
- Colors IOFC+7*NSHD - IOLC+7*NSHD = yellows
the colors you define by calling TDCLRS? you can use them for literally anything, but they're especially iconic when you're calling TDPACK routines to render surfaces. it's giving main character energy π¦
the arguments of TDCLRS are, like, as follows:
IWIDβ (an input expression of type INTEGER) the workstation identifier. it's the ID, bestie, the vibe check for which workstation you're talking to.IBOWβ (an input expression of type INTEGER) a flag specifying the basic color scheme (white on black or black on white). ifIBOWis 0, the foreground color is white and the background color is black; ifIBOWis non-zero, the opposite is true. flip the whole aesthetic, why not πSHDEandSHDRβ (input expressions of type REAL) each of these values is between 0 and 1, inclusive, specifying how color shades are to be generated. values ofSHDEnear 0 call for more intense shades to be used, while values near 1 call for more nearly pastel shades to be used. values ofSHDRnear 0 say that a narrower range of shades is to be used, while values near 1 say that a broader range of shades is to be used. so likeβ¦ 0 = loud and narrow, 1 = soft and expansive. we contain multitudes πΈIOFCandIOLCβ (input expressions of type INTEGER) these specify the first and last integers in a block of color indices to be used for NSHD shades of gray ranging from pure white to pure black (whereNSHD=IOLC-IOFC+1). the next NSHD indices (in numerical order) will be used for the shades of gray selected bySHDEandSHDR; the next NSHD indices after that for selected shades of red, the next NSHD indices after that for selected shades of green, and so on. it's a whole conga line of color indices πILMTβ (an input expression of type INTEGER) using a value between 1 and 7, inclusive, says that only that many blocks of NSHD indices will be defined. for example, ifILMThas the value 4, only the black-to-white scale and the shades of gray, red, and green will be generated; shades of blue, cyan, magenta, and yellow will not be. (this allows one to have more shades of each color at the expense of using fewer colors.) using a value ofILMTless than 1 or greater than 7 will result in all8*NSHDsets of color shades being defined. so you either limit it on purpose or you get the whole entire rainbow, no in-between π
π«Ά C-BINDING DESCRIPTION
the C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different syntax, iykyk π
π ACCESS
to use TDCLRS or c_tdclrs, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. don't scramble the order, bestie, that's not the vibe π
π SEE ALSO
Online: tdctri, tddtri, tdgeti, tdgetr, tdgrds, tdgrid, tdgtrs, tdinit, tditri, tdlbla, tdlbls, tdline, tdlnpa, tdmtri, tdotri, tdpack, tdpack_params, tdpara, tdplch, tdprpa, tdprpi, tdprpt, tdseti, tdsetr, tdsort, tdstri, tdstrs
(the whole friend group, fr fr π«)
Β©οΈ COPYRIGHT
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
not me reminding you to actually read the license agreement π it's giving responsible queen behavior π
okay that's the whole page, no cap. this was TDCLRS(3NCARG) from the NCAR GRAPHICS manual, UNIX edition, dated July 1997 β old enough to be vintage but still absolutely serving β¨π¦π slay responsibly, bestie πΈ
π¦ 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