Coloring individual staff lines: Difference between revisions

Import snippet from LSR
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
The <code>StaffSymbol</code> callback <code>color-staff-lines</code> takes a set of colors (using LilyPond's predefined colors or the functions <code>x11-color</code> and <code>rgb-color</code>) which are applied to each staff line in turn starting with the fifth line (for a standard staff), or each item in the list for custom staves defined with <code>line-positions</code>. To signal that a particular line between colored lines should remain black, use <code>#f</code>.
The <code>StaffSymbol</code> callback <code>color-staff-lines</code> takes a set of colors (using LilyPond's predefined colors or the functions <code>x11-color</code> and <code>rgb-color</code>) which are applied to each staff line in turn starting with the fifth line (for a standard staff), or each item in the list for custom staves defined with <code>line-positions</code>. To signal that a particular line between colored lines should remain black, use <code>#f</code>.


<lilypond version="2.24.0">
Contributed by Neil Puttock.
%% http://lsr.di.unimi.it/LSR/Item?id=700
 
%LSR This snippet was contributed by Neil Puttock


<lilypond version="2.24">
#(define-public ((color-staff-lines . rest) grob)
#(define-public ((color-staff-lines . rest) grob)


Line 120: Line 118:
[[Category:Version-specific]]
[[Category:Version-specific]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Snippet]]