From 50928735daee408de73737b055b2535d96424824 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 18 Jul 2016 17:05:11 +0200 Subject: 2016-07-18 16:51:00 --- tex/context/base/mkiv/colo-ini.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tex/context/base/mkiv/colo-ini.lua') 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 +} -- cgit v1.2.3