[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change tie color
From: |
Thomas Morley |
Subject: |
Re: change tie color |
Date: |
Tue, 19 Sep 2017 23:21:08 +0200 |
2017-09-19 22:48 GMT+02:00 Gianmaria Lari <address@hidden>:
> This code
>
> \version "2.19.65"
> \fixed c'' {
> \override Tie.color = #grey
> c1 ~
> \revert Tie.color
> \override NoteHead.color = #grey
> c1
> \revert NoteHead.color
> }
>
>
> change the color of the tie and the second c1 note (see attached image).
> I would like to simplify the previous code and write something like:
>
> \version "2.19.65"
> \fixed c'' {
> c1 \grey {~ c1}
> }
>
> Here http://lsr.di.unimi.it/LSR/Item?id=985 there is something similar but I
> have not been able to modify it according my needs.
> How can I do it?
>
> Thank you, g
The name 'grey' is taken, see:
\void \displayScheme \grey
returns the rgb-list of the color called grey, i.e. (list 0.5 0.5 0.5)
So use different identifiers.
\version "2.19.65"
%% override
colorGrey =
\override Tie.color =
#(lambda (grob)
(ly:grob-set-property! (ly:spanner-bound grob RIGHT) 'color grey)
grey)
%% turned into tweak
tweakGrey = \single \colorGrey \etc
\fixed c'' {
c1 \tweakGrey ~ c1
}
%% native tweak
myGrey =
\tweak color
#(lambda (grob)
(ly:grob-set-property! (ly:spanner-bound grob RIGHT) 'color grey)
grey)
\etc
\fixed c'' {
c1\myGrey ~ c1
}
Cheers,
Harm
- change tie color, Gianmaria Lari, 2017/09/19
- Re: change tie color,
Thomas Morley <=