On 1/1/2025 10:02 PM, vm via ntg-context wrote:
with the environment of
\startMPcode you can scale a color with a factor like 0.25red and 0.5blue
But this not seem to work when you define a color yourself first
definecolor [ name = "MyColor", r = .5, g = .25, b = .25 ] ; fill fullsquare xyscaled (40mm, 15mm) withcolor "MyColor" ;
fill fullsquare xyscaled (40mm, 15mm) shifted (42mm, 0mm) withcolor 0.5"MyColor" ;
What would be the correct way to scale self defined colors?
define more colors anyway, you can try to comment line 1543 in mlib-pps.lmt and then, after making a new format file, see if \startMPpage definecolor [ name = "MyColor", r = .5, g = .25, b = .25 ] ; fill fullsquare xyscaled (40mm, 15mm) withcolor "MyColor" ; fill fullsquare xyscaled (40mm, 15mm) shifted (42mm, 0mm) withcolor .5 * namedcolor("MyColor") ; fill fullsquare xyscaled (40mm, 15mm) shifted (84mm, 0mm) withcolor .75 * namedcolor("MyColor") ; \stopMPpage works Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------