Re: Colors in alists

2014-11-05 Thread Urs Liska
uoting-and-un-quoting): https://www.youtube.com/watch?v=ZoKozeeYsWk Thanks for that. Interesting indeed. Though it seems there's a lot of practicing ahead ... Best Urs The whole series of videos is good. Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabbl

Re: Colors in alists

2014-11-05 Thread Urs Liska
Hi all who replied (I'm just writing this once and mean all), thank you for your interesting approaches. In the end I'll stick with Jay's suggestion. It's slightly awkward when defining the alist, but it seems to me more efficient when retrieving the element. The alist is defined only once whe

Re: Colors in alists

2014-11-05 Thread anders . vinjar
> "U" == Urs Liska writes: U> I want to store colors in an alist like U> #(define types U> '(("one" . "red") U> ("two" . "blue"))) U> I can retrieve and display the values with assoc-ref but I don't U> know how to turn the returned string into a color to be used

Re: Colors in alists

2014-11-04 Thread Urs Liska
Am 05.11.2014 00:02, schrieb Thomas Morley: 2014-11-04 19:05 GMT+01:00 Urs Liska : Am 04.11.2014 15:47, schrieb Jay Anderson: On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska wrote: I want to store colors in an alist like #(define types '(("one" . "red") ("two" . "blue"))) I can retrieve and disp

Re: Colors in alists

2014-11-04 Thread Thomas Morley
2014-11-04 19:05 GMT+01:00 Urs Liska : > > Am 04.11.2014 15:47, schrieb Jay Anderson: >> >> On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska wrote: >>> >>> I want to store colors in an alist like >>> >>> #(define types >>> '(("one" . "red") >>> ("two" . "blue"))) >>> >>> I can retrieve and display the va

Re: Colors in alists

2014-11-04 Thread Paul Morris
outube.com/watch?v=ZoKozeeYsWk The whole series of videos is good. Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168406.html Sent from the User mailing list archive at Nabble.com. _

Re: Colors in alists

2014-11-04 Thread Paul Morris
f types "one"))) #(newline) #(display (color? (assoc-ref typesB "one"))) % This displays: #t #t With either of these the red and blue are not quoted which seems to have been the problem before. -Paul -- View this message in

Re: Colors in alists

2014-11-04 Thread Urs Liska
Am 04.11.2014 15:47, schrieb Jay Anderson: On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska wrote: I want to store colors in an alist like #(define types '(("one" . "red") ("two" . "blue"))) I can retrieve and display the values with assoc-ref but I don't know how to turn the returned string into a

Re: Colors in alists

2014-11-04 Thread R. Mattes
On Tue, 04 Nov 2014 12:18:33 +0100, Urs Liska wrote > Am 4. November 2014 12:01:22 MEZ, schrieb Marc Hohl : > >Am 04.11.2014 um 11:48 schrieb Urs Liska: > >> I want to store colors in an alist like > >> > >> #(define types > >> '(("one" . "red") > >> ("two" . "blue"))) > >> > >> I can retrieve and

Re: Colors in alists

2014-11-04 Thread Jay Anderson
On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska wrote: > I want to store colors in an alist like > > #(define types > '(("one" . "red") > ("two" . "blue"))) > > I can retrieve and display the values with assoc-ref but I don't know how to > turn the returned string into a color to be used in an override.

Re: Colors in alists

2014-11-04 Thread Urs Liska
retrieving the value with assoc-ref from an alist (as defined in my initial post). It seems that then it's not a color object anymore. > >-- >View this message in context: >http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp1

Re: Colors in alists

2014-11-04 Thread Paul Morris
Here we go: \version "2.18.2" #(display (color? "red")) #(newline) #(display (color? 'red)) #(newline) #(display (color? red)) -- View this message in context: http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168391.html Sent from the User mailing l

Re: Colors in alists

2014-11-04 Thread Paul Morris
uot;) #(newline) #(display 'red) #(newline) #(display red) #(newline) #(display blue) #(newline) #(display green) Without a compilable tiny example I can't try this out though. Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Colors-in-alists

Re: Colors in alists

2014-11-04 Thread Urs Liska
Am 4. November 2014 12:01:22 MEZ, schrieb Marc Hohl : >Am 04.11.2014 um 11:48 schrieb Urs Liska: >> I want to store colors in an alist like >> >> #(define types >> '(("one" . "red") >> ("two" . "blue"))) >> >> I can retrieve and display the values with assoc-ref but I don't know >> how to turn th

Re: Colors in alists

2014-11-04 Thread Marc Hohl
Am 04.11.2014 um 11:48 schrieb Urs Liska: I want to store colors in an alist like #(define types '(("one" . "red") ("two" . "blue"))) I can retrieve and display the values with assoc-ref but I don't know how to turn the returned string into a color to be used in an override. Untested: maybe y

Colors in alists

2014-11-04 Thread Urs Liska
I want to store colors in an alist like #(define types '(("one" . "red") ("two" . "blue"))) I can retrieve and display the values with assoc-ref but I don't know how to turn the returned string into a color to be used in an override. Any help appreciated. Urd _