On Sat, Jun 30 2012, Chong Yidong wrote: > Well, first of all there are really only two cases that need to be > handled: terminals that can handle #rrggbb, and 16-color terminals. In > my experience, 256-color xterms give a rather good approximation of the > desired colors automatically, without manual color placement. Clearly that fails with naquadah-theme. I wish I had more time to try to fix this. > As for matching color names to faces, the approach that we've used in > tango-theme.el and others is to do something like this: > > (let ((class '((class color) (min-colors 89))) > ;; Tango palette colors. > (butter-1 "#fce94f") > ...) > > (custom-theme-set-faces > 'tango-dark > ... > `(cursor ((,class (:background ,butter-1)))) > > Apart from handling multiple terminals, naquadah-simple-face-to-multiple > aims to do the same thing, right? Yes, that's exactly what we're doing. > I'm guessing the reason is that you feel that having explicit > functions is more structured/less ad-hoc than the above let-form. Not, that's because I ignored the syntax you used in tango actually. > If that's the case, maybe the solution is to add a new macro to > custom.el, which does something like this: > > (custom-theme-set-faces-with-color-names THEME TERMINALS COLORS FACES...) > > (custom-theme-set-faces-with-color-names > 'tango-dark > ((term-1 ((class color) (min-colors 4096))) > (term-2 ((class color) (min-colors 16)))) > ((butter (term-1 "#fce94f") (term-2 "yellow"))) > (cursor :background butter) > ...) > > WDYT? That would be really handy, indeed. Do you propose to do the patch yourself, or should it? -- /* Julien Danjou ╭ Free Software hacker & freelance ╰ http://julien.danjou.info */