diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-11-01 21:24:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-11-01 21:24:00 +0100 |
commit | e13c1d71259b390bbacfdbe45262091754bd71bc (patch) | |
tree | aad0430edfc610c817f870bdd49c238b961ab848 /tex/context/base/colo-ext.mkiv | |
parent | eab6a73597f38d58fc4d3cfc4fbddb7c3f6e1e8f (diff) | |
download | context-e13c1d71259b390bbacfdbe45262091754bd71bc.tar.gz |
beta 2009.11.01 21:24
Diffstat (limited to 'tex/context/base/colo-ext.mkiv')
-rw-r--r-- | tex/context/base/colo-ext.mkiv | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tex/context/base/colo-ext.mkiv b/tex/context/base/colo-ext.mkiv index 074a0130e..f973af73a 100644 --- a/tex/context/base/colo-ext.mkiv +++ b/tex/context/base/colo-ext.mkiv @@ -75,4 +75,26 @@ \setupcolors[\c!intent=\v!none] +% A goodie that replaces the startMPcolor hackery +% +% \definecolor[red-t] [r=1,t=0.5,a=1] +% \definecolor[green-t][g=1,t=0.5,a=1] +% \defineintermediatecolor[mycolora][0.5,red,green] +% \defineintermediatecolor[mycolorb][0.5,red-t,green-t] +% \starttext +% test {\mycolora OEPS} test +% test {\mycolorb OEPS} test +% \stoptext + +\def\defineintermediatecolor + {\dodoubleempty\dodefineintermediatecolor} + +\def\dodefineintermediatecolor[#1][#2,#3,#4]% -- no checking + {\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi + \ctxlua{colors.defineintermediate("#1",0#2, + \thecolorattribute{#3},\thecolorattribute{#4}, + \thetransparencyattribute{#3},\thetransparencyattribute{#4}, + \iffreezecolors true\else false\fi)}% + \dodefinecolorcommand\setvalue{#1}} + \protect \endinput |