[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colors in alists
From: |
Jay Anderson |
Subject: |
Re: Colors in alists |
Date: |
Tue, 4 Nov 2014 07:47:04 -0700 |
On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska <address@hidden> 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.
Try quasiquote + unquote:
#(define types
`(("one" . ,red)
("two" . ,blue)))
#(display types) => ((one 1.0 0.0 0.0) (two 0.0 0.0 1.0))
-----Jay
Re: Colors in alists,
Jay Anderson <=
Re: Colors in alists, Paul Morris, 2014/11/04
Re: Colors in alists, anders . vinjar, 2014/11/05