diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/colo-ini.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/colo-ini.lua | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/context/base/colo-ini.lua b/Master/texmf-dist/tex/context/base/colo-ini.lua index 1065aadc064..81adfa68091 100644 --- a/Master/texmf-dist/tex/context/base/colo-ini.lua +++ b/Master/texmf-dist/tex/context/base/colo-ini.lua @@ -997,7 +997,10 @@ do if model and model ~= 0 then model = model else - model = forcedmodel(cv[1]) + model = forcedmodel(texgetattribute(a_colorspace)) + if model == 1 then + model = cv[1] + end end if model == 3 then str = formatters["{rgb}{%1.3f,%1.3f,%1.3f}"](cv[3],cv[4],cv[5]) @@ -1021,26 +1024,6 @@ do arguments = { "integer", "integer" } } - -- function commands.pgfregistercolor(name,attribute) - -- local cv = colorvalues[ca] - -- context.pushcatcodes('prt') - -- if cv then - -- local model = forcedmodel(cv[1]) - -- if model == 2 then - -- context["pgfutil@definecolor"]("{%s}{gray}{%1.3f}",name,cv[2]) - -- elseif model == 3 then - -- context["pgfutil@definecolor"]("{%s}{rgb}{%1.3f,%1.3f,%1.3f}",name,cv[3],cv[4],cv[5]) - -- elseif model == 4 then - -- context["pgfutil@definecolor"]("{%s}{cmyk}{%1.3f,%1.3f,%1.3f,%1.3f}",name,cv[6],cv[7],cv[8],cv[9]) - -- else - -- context["pgfutil@definecolor"]("{%s}{gray}{0}",name) - -- end - -- else - -- context["pgfutil@definecolor"]("{%s}{gray}{0}",name) - -- end - -- context.popcatcodes() - -- end - end -- handy |