[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: White on black
From: |
Thomas Morley |
Subject: |
Re: White on black |
Date: |
Wed, 1 Jan 2025 14:00:07 +0100 |
Am Mo., 30. Dez. 2024 um 17:42 Uhr schrieb Simon Albrecht
<simon.albrecht@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
> > <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
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
- Re: White on black,
Thomas Morley <=
- Re: White on black, Simon Albrecht, 2025/01/02
- Re: White on black, Ya Gloops, 2025/01/02
- Re: White on black, Simon Albrecht, 2025/01/02
- Re: White on black, Thomas Morley, 2025/01/02
- Re: White on black, Ya Gloops, 2025/01/03
- Re: White on black, Simon Albrecht, 2025/01/03
- Re: White on black, Thomas Morley, 2025/01/03
- Re: White on black, Simon Albrecht, 2025/01/03
- Re: White on black, Simon Albrecht, 2025/01/03
- White on black with whiteout, Simon Albrecht, 2025/01/06