How can I color specific notes? #1725
Replies: 1 comment 1 reply
-
This is currently not supported. All requests so far in this direction were rather very vague on what the devs were trying to achieve. While technically coloring would be possible, there are various questions to be answered:
alphaTab aims to be cross platform and it supports a wide range of render engines. SVG is just one of them. There it is highly discouraged to access the internal rendering structure of alphaTab. within the rendering canvas everything is subject to change at any time.
Depending on the type of highlighting you want to achieve, the noteBounds might be a way of addressing the osition of desired elements. https://www.alphatab.net/docs/reference/scorerenderer/boundslookup Typically the usecases are very specific and without good insight it is hard for alphaTab to provide a general solution which works for more than just 1 person. The more information you provide, the more possibilities I have to find solutions for the needs 😁 |
Beta Was this translation helpful? Give feedback.
-
I'm trying to color certain notes in order to highlight different voices.
I was hoping to be able to specify the color using the api like this.
I've looked through some other discussions about styling, but it seems like
display.resources
is focused on global styling (fonts, main colors) and what I want to do is specify colors for specific notes.If there's some way to get a reference to the SVG element from a note object or a note id I could color it that way too.
Right now, my best solution for highlighting notes is making them ghost notes. My problem with this is that I want to highlight different notes differently (some notes red, some blue, some green, etc.)
What would be the best way to do this?
Beta Was this translation helpful? Give feedback.
All reactions