stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Patch for User-Defined Colors


From: Scott Jaderholm
Subject: Re: [STUMP] Patch for User-Defined Colors
Date: Mon, 18 Jul 2011 23:07:08 -0400

Nice!

I had to change all "funcall convert" to "funcall #'convert" in make-color-hex.

Why did you go the (set-fg-color (make-color-hex "#dcdccc")) route instead of updating set-any-color (alloc-color/lookup-color?) so color names and hexes could be used the same?

Might be nice to support 3 character colors too, e.g. #333.

Scott


On Sat, Jul 16, 2011 at 9:58 PM, Andrew Knapp <address@hidden> wrote:
Hello, I wanted to use StumpWM, but was turned off by the lack of
user-defined colors, since I want Zenburn everywhere.  This patch adds
support for user-defined colors.  In the variable *colors*, the custom
colors are represented as hex, similar to Emacs' colors: "#xxxxxx".
Here is my *colors*:

(defparameter *colors* (list "#8f8f8f"  ;; dark grey
                            "#cc9393"  ;; zenburn red
                            "#7f9f7f"  ;; zenburn green
                            "#f0dfaf"  ;; tan
                            "#8cd0d3"  ;; blue
                            "#dc8cc3"  ;; magenta
                            "#93e0e3"  ;; cyan
                            "#dcdccc"  ;; white
                            "#dfaf8f"  ;; orange
                            ))

For all other custom color needs, the patch relies on type-checking:
strings are looked up, while anything else is used as-is.  Therefore, to
use custom colors, use something along the lines of the following:

(set-fg-color (make-color-hex "#dcdccc"))

make-color-hex takes a hexadecimal description string, and returns the
XColor that it represents.

--
Andy Knapp

_______________________________________________
Stumpwm-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]