omnibrain / svguitar

Create beautiful SVG guitar chord charts
MIT License
688 stars 41 forks source link

Can not set color or text of open note #49

Closed Aduffy closed 3 years ago

Aduffy commented 3 years ago

I am trying to display a chord with the note name or the interval in each note, but you can not set the text or color of notes set to be played open (fret 0)

image

drawn with :

{
    "root":"G",
    "type":"Major",
    "position":"0",
    "fingers":[
        [6,3,{"text":"1P","color":"var(--int-1P)","strokeColor":"#000"}],
        [5,2,{"text":"3M","color":"var(--int-3M)","strokeColor":"#000"}],
        [4,0,{"text":"5P","color":"var(--int-5P)","strokeColor":"#000"}],
        [3,0,{"text":"1P","color":"var(--int-1P)","strokeColor":"#000"}],
        [2,0,{"text":"3M","color":"var(--int-3M)","strokeColor":"#000"}],
        [1,3,{"text":"1P","color":"var(--int-1P)","strokeColor":"#000"}]
    ],
    "barres":[]
}

Note: root property is used along with string and fret number to calculate the note names and intervals. Above is post processed version of chord from my own formatChord(chord, "interval or note"), that replaces the fingering text with the options for color and replaced text.... Note Also hoping to be able to add strokeColor :-(

omnibrain commented 3 years ago

From version 0.12.0 it will be possible to

... on silent and open strings (X and 0)

The new version should be released in 1-2 hours as soon as the build is complete.

Aduffy commented 3 years ago

Wonderful! Next time im in Zurich, beers are on me!