[pgf-tikz] what's the basic layer equivalent of \pgfsys at color@rgb

Henri Menke henri at henrimenke.de
Sun Dec 11 15:02:26 CET 2022


On Sun, 2022-12-11 at 08:47 +0100, Tamas Papp wrote:
> Hi,
> 
> If I have a color specified as RGB, with a floating point number for
> each channel between 0 and 1, what's the exposed API to set this with
> the basic layer? (as stroke, fill, or both).

\definecolor{mycolor}{rgb}{<r>,<g>,<b>}
\pgfsetcolor{mycolor}

> I am looking for something that calls \pgfsys at color@rgb without
> involving xcolor much, for efficiency.

Without xcolor is not implemented and also not intended. You're not
going to save a meaningful amount of computation time, but your code
will be incompatible with any other color model than rgb.

Cheers, Henri

> 
> best,
> 
> Tamas




More information about the pgf-tikz mailing list.