diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-18 17:05:11 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-18 17:05:11 +0200 |
commit | 50928735daee408de73737b055b2535d96424824 (patch) | |
tree | a16ca5d16734b5bc146f053fe0368e61f4c72400 /tex/context/base/mkiv/colo-ini.lua | |
parent | 3eb2d078f0023266585aec42d98326d72567b9d6 (diff) | |
download | context-50928735daee408de73737b055b2535d96424824.tar.gz |
2016-07-18 16:51:00
Diffstat (limited to 'tex/context/base/mkiv/colo-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/colo-ini.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua index 1213a637f..31db0a691 100644 --- a/tex/context/base/mkiv/colo-ini.lua +++ b/tex/context/base/mkiv/colo-ini.lua @@ -1251,3 +1251,12 @@ end -- inspect(attributes.colors.spec("red")) -- inspect(attributes.colors.spec("red socks")) + +implement { + name = "negatedcolorcomponent", + arguments = "string", + actions = function(s) + s = 1 - (tonumber(s) or 0) + context((s < 0 and 0) or (s > 1 and 1) or s) + end +} |