summaryrefslogtreecommitdiff
path: root/tex/context/base/colo-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/colo-ini.lua')
-rw-r--r--tex/context/base/colo-ini.lua25
1 files changed, 4 insertions, 21 deletions
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index 1065aadc0..81adfa680 100644
--- a/tex/context/base/colo-ini.lua
+++ b/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