Assign colors to buttons according to button text

Hello Stigc56,
I am also interested in the solution. I asked the same question in a post last year...

I was trying to do the same thing again last night without success!
my knowledge in code is light.
I think we have to declare a color variable for each articulation type before the oscInfilter. Something like:

  var artcolor = {
'Staccato': {
  color: 'red',
},
'Portato Short': {
  color: 'blue',
  // etc
}  }

But then, I don't know how to make the link between the displayed articulations and the colors in the buttons.Probably in the receiveOsc field but how? Does anyone have the solution?