Coloring individual staff lines: Difference between revisions

No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:


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>.
Contributed by Neil Puttock.


<lilypond version="2.24">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=700
%LSR This snippet was contributed by Neil Puttock
#(define-public ((color-staff-lines . rest) grob)
#(define-public ((color-staff-lines . rest) grob)


Line 119: Line 117:
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Version-specific]]
[[Category:Version-specific]]
[[Category:Tweaks and overrides]][[Category:Snippet]]
[[Category:Tweaks and overrides]]
[[Category:Snippet]]