Skip to main content
Version: v7

Set Colors

It is currently possible to set colors of some score elements.

There is "color" property in

  • DocumentOptions
  • AnnotationOptions
  • NoteOptions
  • RestOptions
  • LyricsOptions
  • ConnectiveOptions
// Set document foreground and background color.
new DocumentBuilder({ color: "white", background: "black" });

// Set note color
builder.addNote(0, "C4", "2n", { color: "red" });

// Set rest color
builder.addRest(0, "2n", { color: "red" });

// Set annotation color
builder.addAnnotation("ppp", { color: "red" });

Live Example​