summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-pps.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-12-24 21:10:09 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-12-24 21:10:09 +0100
commitd40e81dea53da7bbc91df306814003f7720a167f (patch)
tree8aed8a716370cac0d04145a72405c1beed11b94d /tex/context/base/mkiv/mlib-pps.lua
parentd1f4da02201fd33c139ee1756296e8df53580ff7 (diff)
downloadcontext-d40e81dea53da7bbc91df306814003f7720a167f.tar.gz
2019-12-24 19:54:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-pps.lua')
-rw-r--r--tex/context/base/mkiv/mlib-pps.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 5098eb76d..d23949352 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -447,7 +447,7 @@ function models.cmyk(cr)
local y = cr[3]
local k = cr[4]
if c == m and m == y and y == 0 then
- k = k - 1
+ k = 1 - k
return checked_color_pair(f_gray,k,k)
else
return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
@@ -462,7 +462,11 @@ function models.cmyk(cr)
local y = cr[3]
local k = cr[4]
if n == 3 then
- c, m, y, k = rgbtocmyk(c,m,y)
+ if c == m and m == y then
+ k, c, m, y = 1 - c, 0, 0, 0
+ else
+ c, m, y, k = rgbtocmyk(c,m,y)
+ end
end
return checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
end