[NTG-context] colors in MetaPost

Hans Hagen j.hagen at xs4all.nl
Wed Sep 11 14:31:56 CEST 2019


On 9/11/2019 2:18 PM, Henning Hraban Ramm wrote:
> Am 2019-09-11 um 13:46 schrieb Henning Hraban Ramm <texml at fiee.net>:
>> \definecolor[VerlaufVon][c=75,m=5,y=95,k=60]
>> \definecolor[VerlaufNach][c=88,m=95,y=5,k=60]
> 
> Of course I need values between 0 and 1.
> Sorry for the noise.
> I think I’m too tired...
there is an alternative interface on top of the existing one (coming) ...

% maybe handy:

definecolor [ name = "MyColor3", r = 0.22, g = 0.44, b = 0.66 ] ;
definecolor [ name = "MyColor4", r = 0.66, g = 0.44, b = 0.22 ] ;

% parameter driven:

draw lmt_shade [
     path      = fullcircle scaled 4cm,
     direction = "right",
     domain    = { 0, 2 },
     colors    = { "MyColor3", "MyColor4" },
] ;

but tweaking shades will never be easy

Hans

(working in the metafun xl manual, more soon)

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list