paulrosen / abcjs

javascript for rendering abc music notation
Other
1.9k stars 281 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 5 months ago

paulrosen commented 5 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;
}