Closed craigsapp closed 1 year ago
Fixed with commit https://github.com/craigsapp/humlib/commit/50fe344ef0882bf6aa82d7d300ff5b06947c8e7a
The problem was due to a typo in checking if the color string was empty.
Here is the view in VHV:
The named colors are now being mixed so that the half note ls blue-green.
A problem is that the VHV CSS styling is using red for marked notes, and the note stems are being displayed in red (but the noteheads are using the SVG-embedded colors).
Commit https://github.com/rism-digital/verovio/commit/81f6737e190ab693b6372779ce0dcbfafd5da4da changes the class for colored notes from marked
to color-marked
to avoid collision with VHV css styling of marked notes, which have a default color of red if no SVG color is added to the marked note.
Now the view in VHV is correct with mixed-colored notes when they have two different color markers, and the stems are no longer red from VHV CSS styling:
When there are two or more markers for a note, the note is not colored. In such cases, the first marker should be used to assign color to the note (or generate a color that is a mixture of the two color markers).
Example:
Click to view MEI conversion
```xmlTranscoded from Humdrum
Current rendering:
The half note G in the top part should be colored light blue (or blue-green since it is also has a green marking on it).
The cause of the problem is that a mixture color is being attempted, but it returns black because symbolic colors are being used. When numeric colors are used, the half note is given a blue-green color:
Click to view MEI data for above example
```xmlTranscoded from Humdrum
Rendering:
So when symbolic colors names are used, either return the first color instead of black, or convert the symbolic colors to a numeric color. Here is discussion about doing that: https://stackoverflow.com/questions/1573053/javascript-function-to-convert-color-names-to-hex-codes
Here is a C++ map to store the mappings: