From bf7fc74b4f42f6bc1c57488da72bbc142c47f86a Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Tue, 12 Jul 2016 11:21:11 +0200 Subject: 2016-07-12 10:18:00 --- tex/context/base/mkiv/colo-ini.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tex/context/base/mkiv/colo-ini.lua') 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 -- cgit v1.2.3