Am Mo., 30. Dez. 2024 um 17:42 Uhr schrieb Simon Albrecht <simon.albre...@mail.de>: > > Hi Christ, hi Harm, > > here’s what I have now, combining both your examples, as a small file > for tinkering. As it stands, both top level markup and score are printed > white, as is the tagline, but neither of the score headers. > > Best, Simon > > On 30.12.24 16:54, Thomas Morley wrote: > > Am Sa., 28. Dez. 2024 um 19:01 Uhr schrieb Christ van Willegen > > <cvwille...@gmail.com>: > >> Hello Simon, > >> > >> On Sat, Dec 28, 2024 at 3:25 PM Simon Albrecht <simon.albre...@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
Hi Simon, I extended my previous code: \paper { page-color = #white #(define (page-post-process layout pages) (let ((color (ly:output-def-lookup $defaultpaper 'page-color #f))) (when (color? color) (for-each (lambda (page) (let ((page-stencil (ly:prob-property page 'stencil))) (set! (ly:prob-property page 'stencil) (ly:stencil-add (make-filled-box-stencil (ly:stencil-extent page-stencil X) (ly:stencil-extent page-stencil Y)) (stencil-with-color page-stencil color))))) pages)))) } This should always give a black background, all other objects should be colored with `page-color`, apart from objects which already have a color. Cheers, Harm