summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/colors.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/colors.opm')
-rw-r--r--macros/luatex/optex/colors.opm14
1 files changed, 7 insertions, 7 deletions
diff --git a/macros/luatex/optex/colors.opm b/macros/luatex/optex/colors.opm
index 52dd349f5e..c4ce83ecd9 100644
--- a/macros/luatex/optex/colors.opm
+++ b/macros/luatex/optex/colors.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \colordef {Colors <2020-03-07>}
+\_codedecl \colordef {Colors <2020-03-18>} % loaded in format
\_doc -----------------------------
We declare internal boolean value `\_iflocalcolor` ad do
@@ -107,7 +107,7 @@
\_cod -----------------------------
\_def\_rgbtocmyk #1 #2 #3 ;{%
- \_ea \_stripzeros \_directlua{
+ \_ea \_stripzeros \_detokenize \_ea{\_directlua{
local kr = math.max(#1,#2,#3)
if (kr==0) then
tex.print('0. 0. 0. 1 ;')
@@ -115,23 +115,23 @@
tex.print(string.format('\_pcent.3f \_pcent.3f \_pcent.3f \_pcent.3f ;',
(kr-#1)/kr, (kr-#2)/kr, (kr-#3)/kr, 1-kr))
end
-}}
+}}}
\_def\_cmyktorgb #1 #2 #3 #4 ;{%
- \_ea \_stripzeros \_directlua{
+ \_ea \_stripzeros \_detokenize \_ea{\_directlua{
local kr = 1-#4
tex.print(string.format('\_pcent.3f \_pcent.3f \_pcent.3f ;',
(1-#1)*kr, (1-#2)*kr, (1-#3)*kr))
-}}
+}}}
\_def\_colorcrop{\_directlua{
local m=math.max(color_C, color_M, color_Y, color_K)
if (m>1) then
color_C=color_C/m color_M=color_M/m color_Y=color_Y/m color_K=color_K/m
end
}}
-\_def\_colordefFin{\_colorcrop \_ea \_stripzeros \_directlua{
+\_def\_colordefFin{\_colorcrop \_ea \_stripzeros \_detokenize \_ea{\_directlua{
tex.print(string.format('\_pcent.3f \_pcent.3f \_pcent.3f \_pcent.3f ;',
color_C, color_M, color_Y, color_K))
-}}
+}}}
\_def\_douseK{\_colorcrop \_directlua{
kr=math.min(color_C, color_M, color_Y)
if (kr>=1) then