Coloring individual staff lines: Difference between revisions

Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
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">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=700
%% http://lsr.di.unimi.it/LSR/Item?id=700