\version "2.24.0" \paper { %background-color = #(x11-color "gray20") print-color = #white #(define (page-post-process layout pages) (let ((backgroundcolor (ly:output-def-lookup $defaultpaper 'background-color black)) (color (ly:output-def-lookup $defaultpaper 'print-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 (stencil-with-color (make-filled-box-stencil (ly:stencil-extent page-stencil X) (ly:stencil-extent page-stencil Y)) backgroundcolor) (stencil-with-color page-stencil color))))) pages)))) } \header { title = \markup { Rendering LilyPond files white on black } subtitle = \markup { for screen and projector use } } #(define-markup-command (color-sample layout props clr) (color?) (let ((name (if (string? clr) (string-append "\"" clr "\"") (string-append "#(x11-color \"gray" (number->string (inexact->exact (* 100 (car clr)))) "\")")))) (interpret-markup layout props #{\markup \line \general-align #Y #-1 \with-color $clr { \beam #5 #0 #2 \typewriter $name }#}))) \markup \left-column { \strut \line { Any objects with unspecified colour are printed according to \typewriter print-color. } \vspace #.3 \line { Here are samples of pure white along with other colours that may be easier on the eye: } \typewriter { \color-sample "white" \color-sample "ivory" \color-sample "antiquewhite" \color-sample "navajowhite" } \vspace #.3 \line { The background color may also be adjusted through the paper variable \typewriter background-color. Ideas: } \vspace #.3 \combine \translate #'(-.7 . -7) \with-color #white \filled-box #'(0 . 50) #'(0 . 10) #.7 \left-column { \color-sample "darkslategray" \color-sample "midnightblue" \color-sample #(x11-color "gray20") } \vspace #.3 \line { Appendix 7 of the Notation Reference lists available colors. } \strut } { 1 }