On Wed, Jul 19, 2023 at 3:41 PM Jean Abou Samra <[email protected]> wrote:
> \tweak color #(if (equal? DOWN (ly:grob-property grob 'direction)) red
> blue)
>
> You just forgot to wrap the expression in (lambda (grob) ...) .
>
Yes, that's it:
%%% BEGIN %%%
\version "2.25.3"
\markup "Conditionally colors both tuplet brackets:" \markup \vspace #1
{
\once \override TupletBracket.color = #(lambda (grob)
(if (equal? DOWN (ly:grob-property grob 'direction)) red blue)
)
\times 2/3 {
\times 2/3 { c'4 c' c' }
c'2
c'2
}
}
\markup "Conditionally colors only the inner tuplet bracket:" \markup
\vspace #1
{
\times 2/3 {
\tweak color #(lambda (grob)
(if (equal? DOWN (ly:grob-property grob 'direction)) red blue))
\times 2/3 { c'4 c' c' }
c'2
c'2
}
}
%%% END %%%
Thanks very much again, Jean.
Trevor.
--
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca