Hi list,
for strange reasons, I have to color complete lines in different colors.
I found http://lsr.di.unimi.it/LSR/Item?id=443 which works
great for complete scores, but if I call \applyContext ...
after a line break, the color of the Staff lines does not change.
I tried \stopStaff/\startStaff with no visible difference.
How can I change the definition of override-color-for-all-grobs
to make the second staff line completely red?
Thanks in advance,
Marc
%% http://lsr.di.unimi.it/LSR/Item?id=443
%% see also
http://lilypond.org/doc/v2.18/Documentation/learning/visibility-and-color-of-objects
#(define (override-color-for-all-grobs color)
(lambda (context)
(let loop ((x all-grob-descriptions))
(if (not (null? x))
(let ((grob-name (caar x)))
(display grob-name)
(ly:context-pushpop-property context grob-name 'color color)
(loop (cdr x)))))))
\relative c' {
\applyContext #(override-color-for-all-grobs (x11-color 'blue))
c4\pp\< d e f
\break \stopStaff
\applyContext #(override-color-for-all-grobs (x11-color 'red))
\startStaff
\grace { g16[( a g fis]) } g1\ff\!
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user