summaryrefslogtreecommitdiffstats
path: root/share/extensions/color_rgbbarrel.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/extensions/color_rgbbarrel.py')
-rwxr-xr-xshare/extensions/color_rgbbarrel.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/share/extensions/color_rgbbarrel.py b/share/extensions/color_rgbbarrel.py
new file mode 100755
index 0000000..5458265
--- /dev/null
+++ b/share/extensions/color_rgbbarrel.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+"""Rotate the colors in the selected elements"""
+
+import inkex
+
+class RgbBarrel(inkex.ColorExtension):
+ """
+ Cycle colors RGB -> BRG
+
+ aka Do a Barrel Roll!
+ """
+ def modify_color(self, name, color):
+ return inkex.Color((color.blue, color.red, color.green))
+
+if __name__ == '__main__':
+ RgbBarrel().run()