Chris Spencer <[email protected]> writes: > How do you retain note color for PNG and SVG generation? > > I have the following Lilypond file test.ly: > > \version "2.18" > color = #(define-music-function (parser location color) (string?) #{ > \once \override NoteHead #'color = #(x11-color color) > \once \override Stem #'color = #(x11-color color) > \once \override Rest #'color = #(x11-color color) > \once \override Beam #'color = #(x11-color color) > #}) > > \header { > tagline = "" > title = "Test1" > > } > > \score { > > << \new Staff = xawdxfwebzffzxy { \key a \major > \time 4/4 > r 2 > \color "#00FF00" e' 4
> and although I've specified all notes be green, running `lilypond > --png test.ly` results in a black and white image. > > Why is this? Why are the color statements being ignored? Like the warning LilyPond prints out indicates, the X11 #rrggbb convention is not supported for specifying colors. x11-color instead supports _named_ colors like "green". -- David Kastrup
