MusicXML color attributes are #RRGGBB or #AARRGGBB (alpha first, see the MusicXML color data type).
OSMD's options, model and renderer use CSS colors, where 8-digit hex is #RRGGBBAA (alpha last),
because the strings are handed to SVG/canvas as they are.
Converts #AARRGGBB to #RRGGBBAA. Any other string (#RRGGBB, named colors, undefined) is returned unchanged.
With alphaLast (see [[musicXmlColorsAreAlphaLast]]), 8-digit colors are already #RRGGBBAA and are returned unchanged too.
MusicXML
colorattributes are#RRGGBBor#AARRGGBB(alpha first, see the MusicXMLcolordata type). OSMD's options, model and renderer use CSS colors, where 8-digit hex is#RRGGBBAA(alpha last), because the strings are handed to SVG/canvas as they are.Converts
#AARRGGBBto#RRGGBBAA. Any other string (#RRGGBB, named colors, undefined) is returned unchanged. WithalphaLast(see [[musicXmlColorsAreAlphaLast]]), 8-digit colors are already#RRGGBBAAand are returned unchanged too.