summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pywal/colors.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/pywal/colors.py b/pywal/colors.py
index 7a1a991..a501344 100644
--- a/pywal/colors.py
+++ b/pywal/colors.py
@@ -1,6 +1,7 @@
"""
Generate a colorscheme using imagemagick.
"""
+import collections
import re
import shutil
import subprocess
@@ -64,19 +65,17 @@ def sort_colors(img, colors):
# Create a comment color from the background.
raw_colors[8] = util.lighten_color(raw_colors[0], 0.40)
- colors = {"wallpaper": img}
- colors_special = {}
- colors_hex = {}
+ colors = {}
+ colors["wallpaper"] = img
+ colors["special"] = {}
+ colors["colors"] = collections.OrderedDict()
- colors_special.update({"background": raw_colors[0]})
- colors_special.update({"foreground": raw_colors[15]})
- colors_special.update({"cursor": raw_colors[15]})
+ colors["special"]["background"] = raw_colors[0]
+ colors["special"]["foreground"] = raw_colors[15]
+ colors["special"]["cursor"] = raw_colors[15]
for index, color in enumerate(raw_colors):
- colors_hex.update({"color%s" % index: color})
-
- colors["special"] = colors_special
- colors["colors"] = colors_hex
+ colors["colors"]["color%s" % index] = color
return colors