       ctx.stroke()
       ctx.lineWidth = 1
 
-  draw_finger_position = ({string, fret}, options) ->
-    {is_root, color} = options || {}
+  draw_finger_position = ({string, fret}, options={}) ->
+    {is_root, color} = options
     y = v_gutter + above_fretboard + (fret - 1) * fret_height + fret_height / 2
     ctx.fillStyle = color or (if is_root then 'red' else 'white')
     ctx.strokeStyle = color or (if is_root then 'red' else 'black')

    ctx.fillStyle = 'rgb(128, 128, 128)'
    ctx.fillText "#{chord.name} Chords", diagram_gutter / 2, header_height / 2

    for ix in [0...12]
      pitch = (ix * 5 + 3) % 12
      root_fingering = pitch_fingers[pitch]
      chord_name = "#{NoteNames[pitch]}#{chord.abbr}"
      cell ->
        fingerings = []
        for semitones, degree_index in chord.pitch_classes
          for {string, fret} in intervals_from(root_fingering, semitones)
            fingerings.push {string, fret, degree_index}
        fingerings = best_fingering_for(chord, pitch) if best_fingering
        f.color = colors[f.degree_index] for f in fingerings
        ctx.font = '20px Impact'
        ctx.font = '5pt Times' if draw_diagrams
        ctx.fillStyle = 'rgb(10,20,30)'
        ctx.fillText chord_name, h_gutter, -3
        draw_fingerboard fingerings

chord_book = (options) ->
  page_count = options.pages

    pitch = pitch_number_for_position(finger_position) % 12
    pitch_fingers[pitch] = finger_position

  degree_colors = ['red', 'blue', 'green', 'orange']
  other_colors = ['rgba(255,0,0 ,.1)', 'rgba(0,0,255, 0.1)', 'rgba(0,255,0, 0.1)', 'rgba(255,0,255, 0.1)']

  grid cols: 3, rows: 4
