lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing staff colour


From: Lukas-Fabian Moser
Subject: Re: Changing staff colour
Date: Fri, 4 Jun 2021 18:25:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi Paul,

Am 04.06.21 um 16:36 schrieb Paul McKay:
I am working on some Haydn piano music and want to distinguish between urtext and my version music. (I plan to write out the variations I use when I repeat.) A neat way to do it would be to change the colour of the staff lines. I can't find a way that works. I can change the colour easily enough at the beginning of the staff, but it doesn't seem possible to change it thereafter. For what I want to achieve, it would be fine to start a new staff but it would need to look like a continuation of a previous one. Here is what I've tried so far. I'd like the final version to have two contiguous bars where the staff colour matches what's indicated by the markup.
Thanks in advance.
Paul

You can change the StaffSymbol colour mid-staff if you use stopStaff / startStaff before and after:

\version "2.22.1"

{
  \override Staff.StaffSymbol.color = #blue
  c'1
  \stopStaff
  \override Staff.StaffSymbol.color = #magenta
  \startStaff
  c'1

}

There are some slight issues with this solution (maybe needing to change BarLine.layer, and tiny gaps if you need to change the colour at a place where there's no bar line), but all of these can be dealt with.

Lukas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]