@tspro/web-music-score
    Preparing search index...

    Function setColor

    • Set color of any score document element. Use combination of color attributes to set color of specific elements.

      setColor("red", "staff");                        // Set color of all staff elements to red.
      setColor("red", "staff", "signature"); // Set color of all signature elements of staff to red.
      setColor("red", "staff", "key", "signature"); // Set color of key signature of staff to red.
      setColor("green", "staff", "time", "signature"); // Set color of time signature of staff to green.
      // etc.

      See ColorAttr for attribute hierarchy tree.

      Parameters

      • color: string

        Color (HTML color code e.g. "green", "#AA6644", etc.)

      • ...colorAttrs: ColorAttr[]

        Any number of color attributes.

      Returns void