paulrosen / abcjs

javascript for rendering abc music notation
Other
1.94k stars 285 forks source link

Is there a simple way to color the notes in certain measures (e.g. even measures are black vs. odd measures are red)? #1011

Open mikehaojiang opened 7 months ago

paulrosen commented 7 months ago

Yes. call something like abcjs.renderAbc(el, str, { add_classes: true }). All the elements can be targeted with CSS. For instance:


.abcjs-mm0,.abcjs-mm2, abcjs-mm4 {
  fill: red;
}