how to colour chord symbols

• Jun 6, 2023 - 00:00

I've found a plugin that colours the notes automatically, I've modified it a little to suit but I want to be able to colour the chords too- but going around in circles trying to figure out how to do it. I want to colour them pretty much like hooktheory but rainbow colours ROYGBIV instead. So in a major key I will be red, ii orange, iii Yellow etc, and in minor i will be Indigo, III will be red etc. I can't work out whether it's chordsymbol, or harmony or what it is to colour, and how to do it, not a programmer. I'll attach how it is so far. Any help is appreciated.

Attachment Size
modified functional colour.qml 10.03 KB


EDIT: Or less cryptic:
var segment = curScore.firstSegment();
while (segment) {
var aCount = 0;
var annotation = segment.annotations[aCount];
while (annotation) {


if (annotation.type == Element.HARMONY) {
& if (annotation.color == "#ff0000")

annotation.color could be read only...

In reply to by elsewhere

Thanks so much for your speedy reply. I'm a little unsure where to put this in the plugin I attached- I tried putting it under a functioncolorharmony but it just crashed musescore both times. My programming knowledge is almost nil, so will have to get help from someone who knows where to put this before I can make use of it.

In reply to by Jojo-Schmitz

Yes, that would be great, I couldn't find one though. If there is please send the link. The color notes plugin colours them Red for C, Orange for D etc. The system I use is like hook theory so the colours relate to the scale degrees rather than the pitch of the note- which makes transposing music a piece of cake. The plugin I was working off initially was this hooktheory one… but then I just found this one that works out the key automatically so I like this one better and that's the basis of the one I attached. But if there was an addition to the color notes plugin that coloured the chord symbols in too, that would be fantastic, then I can just transpose the music into C major, colour the chords in with the plugin, and then transpose it back to the key I wanted it in and the colours would stay the same. And seeing the code for the addition to the color notes plugin would hopefully show me what I needed to know to modify the other plugin.

Do you still have an unanswered question? Please log in first to post your question.