Changes

Jump to navigation Jump to search
96 bytes removed ,  08:50, 23 July 2023
\usemodule[mathfun]
\def\RED{\mathexpr[.3N]{\getvariable{ColorName}{r}/255}}
\def\GREEN{\mathexpr[.3N]{\getvariable{ColorName}{g}/255}}
\def\BLUE{\mathexpr[.3N]{\getvariable{ColorName}{b}/255}}
% Define the actual color based on variables:
\definecolor[ColorName][% r={\REDmathexpr[.3N]{\getvariable{ColorName}{r}/255}}, g={\mathexpr[.3N]{\GREENgetvariable{ColorName}{g}/255}}, b={\BLUEmathexpr[.3N]{\getvariable{ColorName}{b}/255}},]%
% Test it:
\startTEXpage[offset=5mm]
Hello \framed[backgroundcolor=ColorName, background=color,backgroundcolor=ColorName]{WORLD}!
\\
Red: \RED\\Green: \GREEN\\Blue: \BLUEcolorcomponents{ColorName}
\stopTEXpage
</texcode>
\usemodule[mathfun]
\def\RED{\mathexpr[.3N]{\getvariable{ColorName}{r}/255}}
\def\GREEN{\mathexpr[.3N]{\getvariable{ColorName}{g}/255}}
\def\BLUE{\mathexpr[.3N]{\getvariable{ColorName}{b}/255}}
% Define the actual color based on variables:
\definecolor[ColorName][% r={\REDmathexpr[.3N]{\getvariable{ColorName}{r}/255}}, g={\mathexpr[.3N]{\GREENgetvariable{ColorName}{g}/255}}, b={\BLUEmathexpr[.3N]{\getvariable{ColorName}{b}/255}},]%
% Test it:
\startTEXpage[offset=5mm]
Hello \framed[backgroundcolor=ColorName, background=color,backgroundcolor=ColorName]{WORLD}!
\\
Red: \RED\\Green: \GREEN\\Blue: \BLUEcolorcomponents{ColorName}
\stopTEXpage
</context>
194

edits

Navigation menu