diff --git a/pywal/__main__.py b/pywal/__main__.py index 8f68387..2d22f3f 100755 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -90,7 +90,7 @@ def process_args(args): # Create a list of hex colors. colors_plain = gen_colors.get_colors(image, args.q) - colors_plain[8] = set_colors.set_grey(colors_plain) + # colors_plain[8] = set_colors.set_grey(colors_plain) if not args.n: wallpaper.set_wallpaper(image) diff --git a/pywal/gen_colors.py b/pywal/gen_colors.py index 3f5e16e..3814819 100755 --- a/pywal/gen_colors.py +++ b/pywal/gen_colors.py @@ -122,4 +122,22 @@ def get_colors(img, quiet): def sort_colors(colors): """Sort the generated colors.""" - return colors[:1] + colors[9:] + colors[8:] + raw_colors = colors[:1] + colors[9:] + colors[8:] + + # Special colors. + colors_special = {} + colors_special.update({"background": raw_colors[0]}) + colors_special.update({"foreground": raw_colors[15]}) + colors_special.update({"cursor": raw_colors[15]}) + + # Colors 0-15 + colors_hex = {} + [colors_hex.update({f"color{index}": color}) # pylint: disable=W0106 + for index, color in enumerate(raw_colors)] + + # Add the colors to a dict. + colors = {} + colors["special"] = colors_special + colors["colors"] = colors_hex + + return colors