aboutsummaryrefslogtreecommitdiff
path: root/theme
diff options
context:
space:
mode:
Diffstat (limited to 'theme')
-rw-r--r--theme/.config/xressource_colors26
-rw-r--r--theme/scripts/colors.py64
2 files changed, 90 insertions, 0 deletions
diff --git a/theme/.config/xressource_colors b/theme/.config/xressource_colors
new file mode 100644
index 0000000..d836d23
--- /dev/null
+++ b/theme/.config/xressource_colors
@@ -0,0 +1,26 @@
+!This theme has been generated with the command
+!colors.py 90 40 60 90 70 30
+#define _color1 #b347b3
+#define _color9 #e68ae6
+XTerm*color1 : #b347b3
+XTerm*color9 : #e68ae6
+#define _color3 #b34747
+#define _color11 #e68a8a
+XTerm*color3 : #b34747
+XTerm*color11 : #e68a8a
+#define _color2 #b31147
+#define _color10 #e65c8a
+XTerm*color2 : #b31147
+XTerm*color10 : #e65c8a
+#define _color6 #7db347
+#define _color14 #b8e68a
+XTerm*color6 : #7db347
+XTerm*color14 : #b8e68a
+#define _color4 #b37d47
+#define _color12 #e6b88a
+XTerm*color4 : #b37d47
+XTerm*color12 : #e6b88a
+#define _color5 #b3b347
+#define _color13 #e6e68a
+XTerm*color5 : #b3b347
+XTerm*color13 : #e6e68a
diff --git a/theme/scripts/colors.py b/theme/scripts/colors.py
new file mode 100644
index 0000000..e78dd3a
--- /dev/null
+++ b/theme/scripts/colors.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import colorsys
+
+def define(saturation, value):
+
+ def showColor(hue):
+ return colorsys.hsv_to_rgb(hue, saturation, value)
+
+ return showColor
+
+def showColor(theme, hue):
+
+ r, g, b = theme(hue / 360.)
+ return "#%02x%02x%02x" % (int(r*256), int(g*256), int(b*256))
+
+if __name__ == "__main__":
+
+ if len(sys.argv) < 5:
+ print "Usage :"
+ print "color.py SHIFT LIGHT_SATURATION DARK_SATURATION LIGHT_VALUE DARK_VALUE ANGLE"
+ sys.exit(1)
+
+ shift = int(sys.argv[1])
+ light_s = int(sys.argv[2])/100.
+ dark_s = int(sys.argv[3])/100.
+ light_v = int(sys.argv[4])/100.
+ dark_v = int(sys.argv[5])/100.
+ angle = 60
+ angle = int(sys.argv[6])
+
+ colors = [
+
+ 1, # red
+ 3, # yellow
+ 2, # green
+ 6, # cyan
+ 4, # blue
+ 5, # magenta
+
+ ]
+
+ print "!This theme has been generated with the command"
+ print "!colors.py %s %s %s %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6])
+ dark_theme = define(dark_s, dark_v)
+ light_theme = define(light_s, light_v)
+ for name in colors:
+
+ value = name * angle
+
+ dark = showColor(dark_theme, value - shift)
+ light = showColor(light_theme, value - shift)
+
+ print "#define _color%s %s" % (name, dark)
+ print "#define _color%s %s" % (name+8, light)
+ #print "urxvt.color%d : %s" % (name, dark)
+ #print "urxvt.color%d : %s" % (name+8, light)
+
+ print "XTerm*color%d : %s" % (name, dark)
+ print "XTerm*color%d : %s" % (name+8, light)
+
+