PS_SETCOLOR(3)
π PS_setcolor β setting the vibe (aka the current color) π
okay bestie, so this one is from the pslib library functions manual (the Library Functions Manual girlies, you know the ones), and it's literally just "how do I make things a color" and honestly? iconic. no cap.
β¨ SYNOPSIS β¨
#include <pslib.h>
void PS_setcolor(PSDoc *psdoc, const char *type, const char *colorspace,
float c1, float c2, float c3, float c4)
π DESCRIPTION π
so this sets the color for drawing, filling, or both. that's the whole job. main character energy, honestly.
the colorspace should be one of 'gray', 'spot', 'rgb,, 'cmyk', or 'pattern'. (yes the quote situation on 'rgb, is giving exactly what it's giving in the original, don't come for me π
)
depending on which colorspace you picked, either only the first parameter, the first two, the first three, or all the remaining ones get used. so like β don't just throw random numbers in there and hope, okay?
- if
colorspaceis'pattern'thenc1must contain the pattern id, as returned by PS_begin_pattern(3) π¦ - if
colorspaceis'spot'thenc1must contain the spot color id, as returned by PS_makespotcolor(3), andc2must contain the tint value for the color πΈ
and the type parameter can be 'fillstroke', 'fill', or 'stroke'.
π BUGS π
not me having to tell you this but the second parameter is currently not in any case evaluated. like. at all. zero. the color is always set for filling and drawing, just as if'both'were passed. so whatever you put intype, bestie, the library is gonna ignore it and do its own thing π
so if you want to set the color in order to define a spot color from it, you will have to pass 'both' or 'fill', because PS_makespotcolor(3) utilizes the current fill color. periodt. don't skip this one, it will absolutely get you.
π SEE ALSO π
π«Ά AUTHOR π«Ά
this manual page was written by Uwe Steinmann <uwe@steinmann.cx>. thank you for your service king π
and that's the whole page bestie!! this absolute gem lives in the Library Functions Manual as PS_SETCOLOR(3) β go forth and color things, you got this πβ¨π
π¦ where this page comes from
- debian bookworm: pslib-dev 0.4.7-1+b1
- debian trixie: pslib-dev 0.4.8-1+b1
- ubuntu jammy: pslib-dev 0.4.7-1
- ubuntu noble: pslib-dev 0.4.7-1build2
- ubuntu questing: pslib-dev 0.4.8-1
- ubuntu resolute: pslib-dev 0.4.8-1build1
- ubuntu stonking: pslib-dev 0.4.8-3 Β· GPL-2.0-or-later OR LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms