lilypond-user
[Top][All Lists]
Advanced

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

Re: PNG generation ignoring color


From: David Kastrup
Subject: Re: PNG generation ignoring color
Date: Sat, 16 May 2020 23:37:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Chris Spencer <address@hidden> 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



reply via email to

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