diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-12 11:21:11 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-12 11:21:11 +0200 |
commit | bf7fc74b4f42f6bc1c57488da72bbc142c47f86a (patch) | |
tree | f68db389c0e7902a504f682061d25b1fd103b963 /tex/context/base/mkiv/colo-ini.lua | |
parent | 74326d3975653dbc32ce3cd8b431dba40917e7dc (diff) | |
download | context-bf7fc74b4f42f6bc1c57488da72bbc142c47f86a.tar.gz |
2016-07-12 10:18:00
Diffstat (limited to 'tex/context/base/mkiv/colo-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/colo-ini.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua index b1d9c2f9a..467ec2c47 100644 --- a/tex/context/base/mkiv/colo-ini.lua +++ b/tex/context/base/mkiv/colo-ini.lua @@ -410,7 +410,7 @@ local function defineprocesscolor(name,str,global,freeze) -- still inconsistent -- return defineintermediatecolor(name,two,l_color[one],l_color[three],l_transparency[one],l_transparency[three],"",global,freeze) local c1, t1 = resolvedname(one) local c2, t2 = resolvedname(three) - return defineintermediatecolor(name,two,c1,c1,t1,t2,"",global,freeze) + return defineintermediatecolor(name,two,c1,c2,t1,t2,"",global,freeze) else local settings = settings_to_hash_strict(str) if settings then @@ -517,8 +517,15 @@ end local function f(i,colors,fraction) local otf = 0 - for c=1,#colors do - otf = otf + (tonumber(fraction[c]) or 1) * colors[c][i] + if type(fraction) == "table" then + for c=1,#colors do + otf = otf + (tonumber(fraction[c]) or 1) * colors[c][i] + end + else + fraction = tonumber(fraction) + for c=1,#colors do + otf = otf + fraction * colors[c] + end end if otf > 1 then otf = 1 |