lilypond-user
[Top][All Lists]
Advanced

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

Re: Dark Mode sheet music


From: Thomas Morley
Subject: Re: Dark Mode sheet music
Date: Mon, 30 Dec 2024 16:54:24 +0100

Am Sa., 28. Dez. 2024 um 19:01 Uhr schrieb Christ van Willegen
<cvwillegen@gmail.com>:
>
> Hello Simon,
>
> On Sat, Dec 28, 2024 at 3:25 PM Simon Albrecht <simon.albrecht@mail.de> wrote:
>>
>> I would like to obtain LilyPond output with black and white inverted
>> (black background, white music and text) for on-screen use and
>> projections. Does someone know how to achieve that through LilyPond
>> code, or has it been done before? Should absolutely be an LSR snippet IMO.
>
>
> I, too, had this problem. Someone on the list helped me, but I can't find 
> their name right now :-(
>
> Does the attached sample fit your purpose? It's best to split off (part of) 
> this file into an color.ily file that you can include 'everywhere' you need 
> it, so that you can avoid repetition of the color function.
>
> Please note that I tried my best to find all the relevant grob names, but I 
> might have missed some :-(
>
> Regards,
>
> Christ van Willegen
>

To color entire pages it's probably easiest to do:

\paper {
  page-color = #red

  #(define (page-post-process layout pages)
    (let ((color (ly:output-def-lookup $defaultpaper 'page-color #f)))
      (when (color? color)
        (for-each
          (lambda (page)
            (set! (ly:prob-property page 'stencil)
                  (stencil-with-color (ly:prob-property page 'stencil) color)))
          pages))))

}

Cheers,
  Harm



reply via email to

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