Knut Petersen <knut_peter...@t-online.de> writes: > Question 2: I also would like to change the color of the stems, flags > and dots that > belong to a notehead, but those have no 'duration.
You keep saying that, but you look at the duration of the causing event for noteheads in your example anyway, and of course one can do that with stems/flags/dots. > Does anybody have an idea how to give a certain color to those grobs > from inside the code called by the notehead after-line-breaking > override?
colorizator = #(lambda (grob) (define bla (vector red green blue cyan yellow magenta black)) (vector-ref bla (ly:duration-log (ly:event-property (event-cause grob) 'duration)))) \layout { \context { \Voice \override NoteHead.color = #colorizator \override Stem.color = #colorizator \override Dots.color = #colorizator } } \fixed c' { \new Staff { a4. b'16 c' a8 a'2 g'2. f'4 } }
-- David Kastrup
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel